-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Update config_list_from_json function to support YAML parsing #2560
base: main
Are you sure you want to change the base?
Changes from all commits
c4166cd
ad32f63
3e04d2c
1a42c46
b97b99d
6abc696
1f0f407
15e4896
2410ebc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Please modify the content, remove these four lines of comment and rename this file to OAI_CONFIG_LIST to run the sample code. | ||
# If using pyautogen v0.1.x with Azure OpenAI, please replace "base_url" with "api_base" (line 13 and line 19 below). Use "pip list" to check version of pyautogen installed. | ||
|
||
# NOTE: This configuration lists GPT-4 as the default model, as this represents our current recommendation, and is known to work well with AutoGen. If you use a model other than GPT-4, you may need to revise various system prompts (especially if using weaker models like GPT-3.5-turbo). Moreover, if you use models other than those hosted by OpenAI or Azure, you may incur additional risks related to alignment and safety. Proceed with caution if updating this default. | ||
- model: gpt-4 | ||
api_key: <your OpenAI API key here> | ||
tags: | ||
- gpt-4 | ||
- tool | ||
|
||
- model: <your Azure OpenAI deployment name> | ||
api_key: <your Azure OpenAI API key here> | ||
base_url: <your Azure OpenAI API base here> | ||
api_type: azure | ||
api_version: 2024-02-15-preview | ||
|
||
- model: <your Azure OpenAI deployment name> | ||
api_key: <your Azure OpenAI API key here> | ||
base_url: <your Azure OpenAI API base here> | ||
api_type: azure | ||
api_version: 2024-02-15-preview |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
# Disallowing 2.6.0 can be removed when this is fixed https://github.com/pydantic/pydantic/issues/8705 | ||
"pydantic>=1.10,<3,!=2.6.0", # could be both V1 and V2 | ||
"docker", | ||
"pyyaml", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually I dont see any of test dependency or optional dependency under setup.py |
||
"packaging", | ||
] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the yaml dependency is not installed, we can fall back to use
json
module. We can do this by checking for yaml import error during import, and use that information to choose whether to use yaml load or json load.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, it sounds good