Skip to content

Adjust the azure model deployment name call corresponding to README#309

Merged
sashabaranov merged 11 commits intosashabaranov:masterfrom
zjy282:master
May 15, 2023
Merged

Adjust the azure model deployment name call corresponding to README#309
sashabaranov merged 11 commits intosashabaranov:masterfrom
zjy282:master

Conversation

@zjy282
Copy link
Copy Markdown
Contributor

@zjy282 zjy282 commented May 11, 2023

According to the modification of #306, adjust the azure model deployment name call corresponding to README

@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2023

Codecov Report

Merging #309 (12ddb93) into master (be253c2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #309   +/-   ##
=======================================
  Coverage   92.63%   92.63%           
=======================================
  Files          22       22           
  Lines         679      679           
=======================================
  Hits          629      629           
  Misses         37       37           
  Partials       13       13           

@sashabaranov
Copy link
Copy Markdown
Owner

Thank you for the PR!

Comment thread README.md Outdated
config := openai.DefaultAzureConfig("your Azure OpenAI Key", "https://your Azure OpenAI Endpoint ", "your Model deployment name")
config := openai.DefaultAzureConfig("your Azure OpenAI Key", "https://your Azure OpenAI Endpoint")
config.AzureModelMapperFunc = func(model string) string {
azureModelMapping = []string{
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! Could you please comment out the config.AzureModelMapperFunc section and clearly indicate that it is optional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, great idea

zjy282 added 2 commits May 12, 2023 09:13
…l deployment name call corresponding to README

#308

Add AzureModelMapperFunc custom function instructions
…l deployment name call corresponding to README

#308

Add AzureModelMapperFunc custom function instructions
@sonicrang
Copy link
Copy Markdown

I've try it in my application and it should be:

config.AzureModelMapperFunc = func(model string) string {
			azureModelMapping := map[string]string{
				defaultModelType: deploymentName,
			}
			return azureModelMapping[model]
		}

Modify variable type definition error
@zjy282
Copy link
Copy Markdown
Contributor Author

zjy282 commented May 13, 2023

我已经在我的应用程序中尝试过它,它应该是:

config.AzureModelMapperFunc = func(model string) string {
			azureModelMapping := map[string]string{
				defaultModelType: deploymentName,
			}
			return azureModelMapping[model]
		}

This problem has been fixed, thanks

@sashabaranov sashabaranov merged commit 83d03fc into sashabaranov:master May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants