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

Add code interpreter for GptAssistant Notebook. #644

Merged
merged 8 commits into from
Nov 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions notebook/agentchat_oai_code_interpreter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
" \"OAI_CONFIG_LIST\",\n",
" file_location=\".\",\n",
" filter_dict={\n",
" \"model\": [\"gpt-3.5-turbo\", \"gpt-35-turbo\", \"gpt-35-turbo-0613\", \"gpt-4\", \"gpt4\", \"gpt-4-32k\"],\n",
" \"model\": [\"gpt-3.5-turbo\", \"gpt-35-turbo\", \"gpt-4\", \"gpt4\", \"gpt-4-32k\"],\n",
sonichi marked this conversation as resolved.
Show resolved Hide resolved
" },\n",
")"
]
Expand All @@ -54,17 +54,10 @@
" \"model\": \"gpt-4\",\n",
" \"api_key\": \"<your OpenAI API key>\",\n",
" }, # OpenAI API endpoint for gpt-4\n",
" {\n",
" \"model\": \"gpt-35-turbo-0631\", # 0631 or newer is needed to use functions\n",
" \"base_url\": \"<your Azure OpenAI API base>\", \n",
" \"api_type\": \"azure\", \n",
" \"api_version\": \"2023-08-01-preview\", # 2023-07-01-preview or newer is needed to use functions\n",
" \"api_key\": \"<your Azure OpenAI API key>\"\n",
" }\n",
"]\n",
"```\n",
"\n",
"You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/notebook/oai_openai_utils.ipynb) for full code examples of the different methods."
"Currently AutoGen v0.2 only supports OpenAI endpoints. You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/notebook/oai_openai_utils.ipynb) for full code examples of the different methods."
sonichi marked this conversation as resolved.
Show resolved Hide resolved
]
},
{
Expand Down Expand Up @@ -122,6 +115,10 @@
"user_proxy = UserProxyAgent(\n",
LeoLjl marked this conversation as resolved.
Show resolved Hide resolved
" name=\"user_proxy\",\n",
" is_termination_msg=lambda msg: \"TERMINATE\" in msg[\"content\"],\n",
" code_execution_config={\n",
" \"work_dir\": \"coding\",\n",
" \"use_docker\": False, # set to True or image name like \"python:3\" to use docker\n",
" },\n",
" human_input_mode=\"NEVER\"\n",
")\n",
"\n",
Expand Down
Loading