Skip to content

Commit

Permalink
polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
davorrunje committed Jan 7, 2024
1 parent 9119d98 commit 16c79a1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 17 deletions.
2 changes: 1 addition & 1 deletion notebook/agentchat_MathChat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"metadata": {},
"outputs": [],
"source": [
"# The wolfram alpha app id is required for this example (the assistant may choose to query Wolfram Alpha).\n",
"import os\n",
"\n",
"import autogen\n",
Expand Down Expand Up @@ -294,6 +293,7 @@
"metadata": {},
"outputs": [],
"source": [
"# The wolfram alpha app id is required for this example (the assistant may choose to query Wolfram Alpha).\n",
"if \"WOLFRAM_ALPHA_APPID\" not in os.environ:\n",
" os.environ[\"WOLFRAM_ALPHA_APPID\"] = open(\"wolfram.txt\").read().strip()\n",
"\n",
Expand Down
4 changes: 3 additions & 1 deletion notebook/agentchat_function_call.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"metadata": {},
"outputs": [],
"source": [
"# define functions according to the function description\n",
"from IPython import get_ipython\n",
"from typing_extensions import Annotated\n",
"\n",
Expand Down Expand Up @@ -216,6 +215,9 @@
")\n",
"\n",
"\n",
"# define functions according to the function description\n",
"\n",
"\n",
"@user_proxy.register_for_execution()\n",
"@chatbot.register_for_llm(name=\"python\", description=\"run cell in ipython and return the execution result.\")\n",
"def exec_python(cell: Annotated[str, \"Valid Python cell to execute.\"]) -> str:\n",
Expand Down
2 changes: 1 addition & 1 deletion notebook/agentchat_function_call_async.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"metadata": {},
"outputs": [],
"source": [
"# define functions according to the function description\n",
"import time\n",
"\n",
"from typing_extensions import Annotated\n",
Expand Down Expand Up @@ -196,6 +195,7 @@
" code_execution_config={\"work_dir\": \"coding\"},\n",
")\n",
"\n",
"# define functions according to the function description\n",
"\n",
"# An example async function\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,32 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%capture --no-stderr\n",
"# %pip install \"pyautogen>=0.2.3\"\n",
"import random\n",
"from typing import Dict, List\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import networkx as nx\n",
"\n",
"import autogen\n",
"from autogen.agentchat.assistant_agent import AssistantAgent\n",
"from autogen.agentchat.groupchat import GroupChat\n",
"\n",
"%pip install networkX~=3.2.1\n",
"%pip install matplotlib~=3.8.1"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import random # noqa E402\n",
"\n",
"import matplotlib.pyplot as plt # noqa E402\n",
"import networkx as nx # noqa E402\n",
"\n",
"import autogen # noqa E402\n",
"from autogen.agentchat.assistant_agent import AssistantAgent # noqa E402\n",
"from autogen.agentchat.groupchat import GroupChat # noqa E402"
]
},
{
"cell_type": "code",
"execution_count": 3,
Expand Down
2 changes: 1 addition & 1 deletion notebook/agentchat_microsoft_fabric.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@
}
],
"source": [
"# Choose different models\n",
"from synapse.ml.mlflow import get_mlflow_env_config\n",
"\n",
"import autogen\n",
"\n",
"# Choose different models\n",
"config_list = [\n",
" {\n",
" \"model\": \"gpt-4-turbo\",\n",
Expand Down
5 changes: 3 additions & 2 deletions notebook/agenteval_cq_math.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@
"source": [
"import json\n",
"\n",
"# You can set your own log path - we also limited the number of samples to avoid additional costs.\n",
"# By removing the condition about limitations on the number of samples per category, you can run it on all 120 problems\n",
"import os\n",
"from pathlib import Path\n",
"\n",
Expand Down Expand Up @@ -744,6 +742,9 @@
}
],
"source": [
"# You can set your own log path - we also limited the number of samples to avoid additional costs.\n",
"# By removing the condition about limitations on the number of samples per category, you can run it on all 120 problems\n",
"\n",
"log_path = \"../test/test_files/agenteval-in-out/agentchat_results/\"\n",
"\n",
"# The file is no longer in the repo, we can download it from an older commit\n",
Expand Down

0 comments on commit 16c79a1

Please sign in to comment.