Skip to content

Commit

Permalink
Use config list in notebook (microsoft#2537)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonichi committed Apr 28, 2024
1 parent 7ec38ac commit 5758347
Show file tree
Hide file tree
Showing 2 changed files with 348 additions and 345 deletions.
11 changes: 7 additions & 4 deletions notebook/agentchat_auto_feedback_from_code_execution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"from IPython.display import Image, display\n",
"\n",
"import autogen\n",
"from autogen.coding import LocalCommandLineCodeExecutor\n",
"\n",
"config_list = [{\"model\": \"gpt-4\", \"api_key\": os.getenv(\"OPENAI_API_KEY\")}]"
"config_list = autogen.config_list_from_json(\n",
" \"OAI_CONFIG_LIST\",\n",
" filter_dict={\"tags\": [\"gpt-4\"]}, # comment out to get all\n",
")\n",
"# When using a single openai endpoint, you can use the following:\n",
"# config_list = [{\"model\": \"gpt-4\", \"api_key\": os.getenv(\"OPENAI_API_KEY\")}]\n"
]
},
{
Expand Down Expand Up @@ -882,7 +885,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.10.14"
},
"vscode": {
"interpreter": {
Expand Down
Loading

0 comments on commit 5758347

Please sign in to comment.