From 66440ceac63edc71559a529a1ce4e85c4d6857e6 Mon Sep 17 00:00:00 2001 From: bscolinos Date: Tue, 3 Sep 2024 10:33:26 -0400 Subject: [PATCH] Error fix (#113) * Error fix Removed duplicate os.environ["OPENAI_API_KEY"] = Moved imports above class definition to fix error that came from calling beofre importing. * Update notebook.ipynb --------- Co-authored-by: Kevin D Smith --- .../notebook.ipynb | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/notebooks/building-a-multi-agent-ai-app-with-autogen/notebook.ipynb b/notebooks/building-a-multi-agent-ai-app-with-autogen/notebook.ipynb index 0d6acc6..053d612 100644 --- a/notebooks/building-a-multi-agent-ai-app-with-autogen/notebook.ipynb +++ b/notebooks/building-a-multi-agent-ai-app-with-autogen/notebook.ipynb @@ -161,6 +161,20 @@ { "cell_type": "code", "execution_count": 8, + "id": "e4291e67", + "metadata": {}, + "outputs": [], + "source": [ + "import autogen\n", + "from autogen.agentchat.contrib.retrieve_assistant_agent import RetrieveAssistantAgent\n", + "from autogen.agentchat.contrib.retrieve_user_proxy_agent import RetrieveUserProxyAgent\n", + "from autogen import config_list_from_json\n", + "from autogen import AssistantAgent" + ] + }, + { + "cell_type": "code", + "execution_count": 9, "id": "96420b79-707a-491e-a027-dae10c47a7cd", "metadata": {}, "outputs": [], @@ -210,30 +224,15 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "id": "fdeff3db-e4bf-4f01-b6e0-6aad1986badc", "metadata": {}, "outputs": [], "source": [ "import os\n", - "os.environ[\"OPENAI_API_KEY\"] =\n", "os.environ[\"AUTOGEN_USE_DOCKER\"] = \"False\"" ] }, - { - "cell_type": "code", - "execution_count": 10, - "id": "c57ffc6b-4c78-4097-b917-69f9c3a745e7", - "metadata": {}, - "outputs": [], - "source": [ - "import autogen\n", - "from autogen.agentchat.contrib.retrieve_assistant_agent import RetrieveAssistantAgent\n", - "from autogen.agentchat.contrib.retrieve_user_proxy_agent import RetrieveUserProxyAgent\n", - "from autogen import config_list_from_json\n", - "from autogen import AssistantAgent" - ] - }, { "cell_type": "code", "execution_count": 11,