-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug for windows and improve sample code (#38)
* fix bug for windows * fix bug for windows * more clear example * link to example * add test * format * comment * fix assertion error * fix test error and links --------- Co-authored-by: Chi Wang (MSR) <[email protected]>
- Loading branch information
Showing
19 changed files
with
132 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Please modify the content, remove this comment and rename this file to OAI_CONFIG_LIST to run the sample code. | ||
[ | ||
{ | ||
"model": "gpt-4", | ||
"api_key": "<your OpenAI API key here>" | ||
}, | ||
{ | ||
"model": "gpt-4", | ||
"api_key": "<your Azure OpenAI API key here>", | ||
"api_base": "<your Azure OpenAI API base here>", | ||
"api_type": "azure", | ||
"api_version": "2023-07-01-preview" | ||
}, | ||
{ | ||
"model": "gpt-3.5-turbo", | ||
"api_key": "<your Azure OpenAI API key here>", | ||
"api_base": "<your Azure OpenAI API base here>", | ||
"api_type": "azure", | ||
"api_version": "2023-07-01-preview" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.1.2" | ||
__version__ = "0.1.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from autogen import AssistantAgent, UserProxyAgent, config_list_from_json | ||
|
||
# Load LLM inference endpoints from an env variable or a file | ||
# See https://microsoft.github.io/autogen/docs/FAQ#set-your-api-endpoints | ||
# and OAI_CONFIG_LIST_sample.json | ||
config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST") | ||
assistant = AssistantAgent("assistant", llm_config={"config_list": config_list}) | ||
user_proxy = UserProxyAgent("user_proxy", code_execution_config={"work_dir": "coding"}) | ||
user_proxy.initiate_chat(assistant, message="Plot a chart of NVDA and TESLA stock price change YTD.") |
Oops, something went wrong.