docs(readme): update format (#317)
This commit is contained in:
@@ -435,7 +435,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
config := openai.DefaultAzureConfig("your Azure OpenAI Key", "https://your Azure OpenAI Endpoint")
|
config := openai.DefaultAzureConfig("your Azure OpenAI Key", "https://your Azure OpenAI Endpoint")
|
||||||
// If you use a deployment name different from the model name, you can customize the AzureModelMapperFunc function
|
// If you use a deployment name different from the model name, you can customize the AzureModelMapperFunc function
|
||||||
// config.AzureModelMapperFunc = func(model string) string {
|
// config.AzureModelMapperFunc = func(model string) string {
|
||||||
@@ -458,7 +457,6 @@ func main() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("ChatCompletion error: %v\n", err)
|
fmt.Printf("ChatCompletion error: %v\n", err)
|
||||||
return
|
return
|
||||||
@@ -466,6 +464,7 @@ func main() {
|
|||||||
|
|
||||||
fmt.Println(resp.Choices[0].Message.Content)
|
fmt.Println(resp.Choices[0].Message.Content)
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user