Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs related to Azure OpenAI's "model" #2315

Merged
merged 5 commits into from
Apr 9, 2024

Conversation

sethupavan12
Copy link
Member

@sethupavan12 sethupavan12 commented Apr 7, 2024

Why are these changes needed?

The current documentation for using Autogen with Azure OpenAI contains an error. It states that the model parameter accepts values like gpt-4 or gpt-3.5-turbo. However, in practice, this parameter should be set to the deployment name, which can be any user-defined string. This discrepancy in the documentation wasted a lot of time for me. Hopefully, this can save some time for others.

Related issue number

Docs concern raised in #822

Checks

@sonichi sonichi added the documentation Improvements or additions to documentation label Apr 8, 2024
@sonichi sonichi enabled auto-merge April 8, 2024 08:14
@jackgerrits
Copy link
Member

It uses the model as the deployment if the deployment is not specified. See the logic here:

def _configure_azure_openai(self, config: Dict[str, Any], openai_config: Dict[str, Any]) -> None:

I do agree this could be made clearer. Given the above logic do you think the proposed change should be updated?

auto-merge was automatically disabled April 8, 2024 14:05

Head branch was pushed to by a user without write access

@sethupavan12
Copy link
Member Author

It uses the model as the deployment if the deployment is not specified. See the logic here:

def _configure_azure_openai(self, config: Dict[str, Any], openai_config: Dict[str, Any]) -> None:

I do agree this could be made clearer. Given the above logic do you think the proposed change should be updated?

Shouldn't the logic raise an error if the deployment name is not specified as it is a mandatory field?
Could you explain why model is used in deployment's absence?

@jackgerrits
Copy link
Member

@sonichi can you comment?

As I understand it - often deployments are named the same as model names so this was simply a shortcut for this case. It may be too "magic" and leads to this sort of confusion

Copy link
Collaborator

@BeibinLi BeibinLi left a comment

Choose a reason for hiding this comment

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

LGTM. Good catch!

@sonichi sonichi enabled auto-merge April 9, 2024 18:18
@sonichi sonichi added this pull request to the merge queue Apr 9, 2024
Merged via the queue into microsoft:main with commit 5292024 Apr 9, 2024
24 checks passed
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* gitfu to get gh verified commits

* revive lost point

* fixed openai model related docs

* newline EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants