File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -435,16 +435,15 @@ import (
435435)
436436
437437func main () {
438-
439438 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-
439+ // If you use a deployment name different from the model name, you can customize the AzureModelMapperFunc function
440+ // config.AzureModelMapperFunc = func(model string) string {
441+ // azureModelMapping = map[string]string{
442+ // "gpt-3.5-turbo": "your gpt-3.5-turbo deployment name",
443+ // }
444+ // return azureModelMapping[model]
445+ // }
446+
448447 client := openai.NewClientWithConfig (config)
449448 resp , err := client.CreateChatCompletion (
450449 context.Background (),
@@ -458,14 +457,14 @@ func main() {
458457 },
459458 },
460459 )
461-
462460 if err != nil {
463461 fmt.Printf (" ChatCompletion error: %v \n " , err)
464462 return
465463 }
466464
467465 fmt.Println (resp.Choices [0 ].Message .Content )
468466}
467+
469468```
470469</details >
471470
You can’t perform that action at this time.
0 commit comments