From fb65e35d8057bf520ccd9c90f34f15fe3f8ca778 Mon Sep 17 00:00:00 2001 From: BabyCNM <86091026+BabyCNM@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:47:43 -0700 Subject: [PATCH 1/2] add contributor --- website/blog/2024-12-02-ReasoningAgent2/index.mdx | 1 + website/blog/authors.yml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/website/blog/2024-12-02-ReasoningAgent2/index.mdx b/website/blog/2024-12-02-ReasoningAgent2/index.mdx index db44aee4ab..18db3d52cd 100644 --- a/website/blog/2024-12-02-ReasoningAgent2/index.mdx +++ b/website/blog/2024-12-02-ReasoningAgent2/index.mdx @@ -2,6 +2,7 @@ title: ReasoningAgent - Tree of Thoughts with Beam Search in AutoGen authors: - Hk669 + - BabyCNM - skzhang1 - sonichi tags: [LLM, GPT, research] diff --git a/website/blog/authors.yml b/website/blog/authors.yml index 5029889ff3..1263a0ec96 100644 --- a/website/blog/authors.yml +++ b/website/blog/authors.yml @@ -164,3 +164,10 @@ ameydesai: title: Head of AI at Nexla url: https://github.com/ameyitis image_url: https://github.com/ameyitis.png + + +BabyCNM: + name: BabyCNM + title: AG2 Contributor + url: https://github.com/BabyCNM + image_url: https://github.com/BabyCNM.png From 9734ef295e341d2e34ac19df2439c3c4e6fc2796 Mon Sep 17 00:00:00 2001 From: Hk669 Date: Sun, 8 Dec 2024 15:37:08 +0530 Subject: [PATCH 2/2] move the ReasoningAgent to main from contrib --- autogen/agentchat/__init__.py | 8 ++++++++ notebook/agentchat_reasoning_agent.ipynb | 7 +++---- website/blog/2024-12-02-ReasoningAgent2/index.mdx | 9 +++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/autogen/agentchat/__init__.py b/autogen/agentchat/__init__.py index 6c3c12e6ce..30770fe5f8 100644 --- a/autogen/agentchat/__init__.py +++ b/autogen/agentchat/__init__.py @@ -7,6 +7,11 @@ from .agent import Agent from .assistant_agent import AssistantAgent from .chat import ChatResult, initiate_chats +from .contrib.reasoning_agent import ( + ReasoningAgent, + ThinkNode, + visualize_tree, +) # Imported last to avoid circular imports from .contrib.swarm_agent import ( @@ -39,4 +44,7 @@ "ON_CONDITION", "AFTER_WORK", "AfterWorkOption", + "ReasoningAgent", + "visualize_tree", + "ThinkNode", ] diff --git a/notebook/agentchat_reasoning_agent.ipynb b/notebook/agentchat_reasoning_agent.ipynb index 7026be6080..e5ab615742 100644 --- a/notebook/agentchat_reasoning_agent.ipynb +++ b/notebook/agentchat_reasoning_agent.ipynb @@ -51,12 +51,11 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "from autogen import AssistantAgent, UserProxyAgent\n", - "from autogen.agentchat.contrib.reasoning_agent import ReasoningAgent, ThinkNode, visualize_tree\n", + "from autogen import AssistantAgent, ReasoningAgent, ThinkNode, UserProxyAgent, visualize_tree\n", "\n", "reason_agent = ReasoningAgent(\n", " name=\"reason_agent\",\n", @@ -2764,7 +2763,7 @@ ] }, "kernelspec": { - "display_name": "venv", + "display_name": "base", "language": "python", "name": "python3" }, diff --git a/website/blog/2024-12-02-ReasoningAgent2/index.mdx b/website/blog/2024-12-02-ReasoningAgent2/index.mdx index d7f859d82b..c514172afa 100644 --- a/website/blog/2024-12-02-ReasoningAgent2/index.mdx +++ b/website/blog/2024-12-02-ReasoningAgent2/index.mdx @@ -74,8 +74,13 @@ Here's a simple example of using ReasoningAgent: ```python import os -from autogen import AssistantAgent, UserProxyAgent -from autogen.agentchat.contrib.reasoning_agent import ReasoningAgent, visualize_tree +from autogen import ( + AssistantAgent, + UserProxyAgent, + ReasoningAgent, + ThinkNode, + visualize_tree +) # Configure the model config_list = [{"model": "gpt-4", "api_key": os.environ.get("OPENAI_API_KEY")}]