File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
ej2-asp-core-mvc/code-snippet/ai-assistview/ai-integrations/gemini-ai Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public async Task<IActionResult> OnPostGetAIResponse([FromBody] PromptRequest re
3939
4040 string apiKey = "" ; // Replace with your key
4141 var googleAI = new GoogleAI ( apiKey : apiKey ) ;
42- var model = googleAI . GenerativeModel ( model : Model . Gemini15Flash ) ;
42+ var model = googleAI . GenerativeModel ( model : Model . Gemini25Flash ) ; //Replace your model name here
4343
4444 var response = await model . GenerateContent ( request . Prompt ) ;
4545
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public async Task<IActionResult> GetAIResponse([FromBody] PromptRequest request)
4242
4343 string apiKey = "" ; // Replace with your key
4444 var googleAI = new GoogleAI ( apiKey : apiKey ) ;
45- var model = googleAI . GenerativeModel ( model : Model . Gemini15Flash ) ;
45+ var model = googleAI . GenerativeModel ( model : Model . Gemini25Flash ) ; //Replace your model name here
4646
4747 var responseText = await model . GenerateContent ( request . Prompt ) ;
4848
Original file line number Diff line number Diff line change 6868 'Content-Type': 'application/json',
6969 'RequestVerificationToken': token
7070 },
71- body: JSON.stringify({ prompt: args.prompt || 'Hi' })
71+ body: JSON.stringify({ prompt: args.prompt})
7272 })
7373 .then(response => {
7474 if (!response.ok) {
Original file line number Diff line number Diff line change 6464 headers: {
6565 'Content-Type': 'application/json'
6666 },
67- body: JSON.stringify({ prompt: args.prompt || 'Hi' })
67+ body: JSON.stringify({ prompt: args.prompt})
6868 })
6969 .then(response => {
7070 if (!response.ok) {
You can’t perform that action at this time.
0 commit comments