File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -436,7 +436,15 @@ import (
436
436
437
437
func main () {
438
438
439
- config := openai.DefaultAzureConfig (" your Azure OpenAI Key" , " https://your Azure OpenAI Endpoint " , " your Model deployment name" )
439
+ config := openai.DefaultAzureConfig (" your Azure OpenAI Key" , " https://your Azure OpenAI Endpoint" )
440
+ // If you use a deployment name different from the model name, you can customize the AzureModelMapperFunc function
441
+ // config.AzureModelMapperFunc = func(model string) string {
442
+ // azureModelMapping = map[string]string{
443
+ // "gpt-3.5-turbo":"your gpt-3.5-turbo deployment name",
444
+ // }
445
+ // return azureModelMapping[model]
446
+ // }
447
+
440
448
client := openai.NewClientWithConfig (config)
441
449
resp , err := client.CreateChatCompletion (
442
450
context.Background (),
You can’t perform that action at this time.
0 commit comments