change azure engine config to modelMapper (#306)
* change azure engine config to azure modelMapper config * Update go.mod * Revert "Update go.mod" This reverts commit 78d14c58f2a9ce668da43f6adbe20b60afcfe0d7. * lint fix * add test * lint fix * lint fix * lint fix * opt * opt * opt * opt
This commit is contained in:
@@ -305,8 +305,7 @@ func Example_chatbot() {
|
||||
func ExampleDefaultAzureConfig() {
|
||||
azureKey := os.Getenv("AZURE_OPENAI_API_KEY") // Your azure API key
|
||||
azureEndpoint := os.Getenv("AZURE_OPENAI_ENDPOINT") // Your azure OpenAI endpoint
|
||||
azureModel := os.Getenv("AZURE_OPENAI_MODEL") // Your model deployment name
|
||||
config := openai.DefaultAzureConfig(azureKey, azureEndpoint, azureModel)
|
||||
config := openai.DefaultAzureConfig(azureKey, azureEndpoint)
|
||||
client := openai.NewClientWithConfig(config)
|
||||
resp, err := client.CreateChatCompletion(
|
||||
context.Background(),
|
||||
|
||||
Reference in New Issue
Block a user