File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed
ej2-asp-core-mvc/code-snippet
ai-assistview/ai-integrations/open-ai Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ public async Task<IActionResult> OnPostGetAIResponse([FromBody] PromptRequest re
3939 return BadRequest ( "Prompt cannot be empty." ) ;
4040 }
4141
42- string endpoint = "" ; // Replace with your Azure OpenAI endpoint
43- string apiKey = "" ; // Replace with your Azure OpenAI API key
44- string deploymentName = "" ; // Replace with your Azure OpenAI deployment name (e.g., gpt-4o-mini)
42+ string endpoint = "Your_Azure_OpenAI_Endpoint " ; // Replace with your Azure OpenAI endpoint
43+ string apiKey = "YOUR_AZURE_OPENAI_API_KEY " ; // Replace with your Azure OpenAI API key
44+ string deploymentName = "YOUR_DEPLOYMENT_NAME " ; // Replace with your Azure OpenAI deployment name (e.g., gpt-4o-mini)
4545
4646 var credential = new AzureKeyCredential ( apiKey ) ;
4747 var client = new AzureOpenAIClient ( new Uri ( endpoint ) , credential ) ;
Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ public async Task<IActionResult> GetAIResponse([FromBody] PromptRequest request)
4141 }
4242
4343 // Azure OpenAI configuration
44- string endpoint = "" ; // Replace with your Azure OpenAI endpoint
45- string apiKey = "" ; // Replace with your Azure OpenAI API key
46- string deploymentName = "" ; // Replace with your Azure OpenAI deployment name (e.g., gpt-4o-mini)
44+ string endpoint = "Your_Azure_OpenAI_Endpoint " ; // Replace with your Azure OpenAI endpoint
45+ string apiKey = "YOUR_AZURE_OPENAI_API_KEY " ; // Replace with your Azure OpenAI API key
46+ string deploymentName = "YOUR_DEPLOYMENT_NAME " ; // Replace with your Azure OpenAI deployment name (e.g., gpt-4o-mini)
4747
4848 var credential = new AzureKeyCredential ( apiKey ) ;
4949 var client = new AzureOpenAIClient ( new Uri ( endpoint ) , credential ) ;
Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ public async Task<IActionResult> GetAIResponse([FromBody] PromptRequest request)
3838 _logger . LogWarning ( "Prompt is null or empty." ) ;
3939 return BadRequest ( "Prompt cannot be empty." ) ;
4040 }
41- string endpoint = "" ; // Replace with your Azure OpenAI endpoint
42- string apiKey = "" ; // Replace with your Azure OpenAI API key
43- string deploymentName = "" ; // Replace with your Azure OpenAI deployment name (e.g., gpt-4o-mini)
41+ string endpoint = "Your_Azure_OpenAI_Endpoint " ; // Replace with your Azure OpenAI endpoint
42+ string apiKey = "YOUR_AZURE_OPENAI_API_KEY " ; // Replace with your Azure OpenAI API key
43+ string deploymentName = "YOUR_DEPLOYMENT_NAME " ; // Replace with your Azure OpenAI deployment name (e.g., gpt-4o-mini)
4444
4545 var credential = new AzureKeyCredential ( apiKey ) ;
4646 var client = new AzureOpenAIClient ( new Uri ( endpoint ) , credential ) ;
Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ public async Task<IActionResult> OnPostGetAIResponse([FromBody] PromptRequest re
3131 return BadRequest ( "Prompt cannot be empty." ) ;
3232 }
3333
34- string endpoint = "" ; // Replace with your Azure OpenAI endpoint
35- string apiKey = "" ; // Replace with your Azure OpenAI API key
36- string deploymentName = "" ; // Replace with your Azure OpenAI deployment name (e.g., gpt-4o-mini)
34+ string endpoint = "Your_Azure_OpenAI_Endpoint " ; // Replace with your Azure OpenAI endpoint
35+ string apiKey = "YOUR_AZURE_OPENAI_API_KEY " ; // Replace with your Azure OpenAI API key
36+ string deploymentName = "YOUR_DEPLOYMENT_NAME " ; // Replace with your Azure OpenAI deployment name (e.g., gpt-4o-mini)
3737
3838 var credential = new AzureKeyCredential ( apiKey ) ;
3939 var client = new AzureOpenAIClient ( new Uri ( endpoint ) , credential ) ;
You can’t perform that action at this time.
0 commit comments