add login api

This commit is contained in:
lzy
2025-05-26 22:04:35 +08:00
parent 07ea5e1aab
commit 97155afe03
3 changed files with 24 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ from autogen_agentchat.teams import SelectorGroupChat, RoundRobinGroupChat, Swar
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
from backend.constant import MODEL, OPENAI_API_KEY, OPENAI_BASE_URL, GRAPH_RAG
from autogen_ext.tools.graphrag import GlobalSearchTool
# from autogen_ext.tools.graphrag import GlobalSearchTool
from backend.tools import hybird_retrieval_from_knowledge_base, search_from_oqmd_by_composition
from backend.custom import SocietyOfMindAgent
@@ -49,7 +49,7 @@ def create_scientist_team(user_input_func: Callable[[str, Optional[CancellationT
handoffs=["Synthesis_Scientist", "Structure_Scientist", "Property_Scientist", "Application_Scientist"]
)
graph_rag_search = GlobalSearchTool.from_settings(settings_path=GRAPH_RAG)
# graph_rag_search = GlobalSearchTool.from_settings(settings_path=GRAPH_RAG)
synthesis_agent = AssistantAgent(
"Synthesis_Scientist",
description="An experienced materials scientist agent who is particularly good at coming up with detailed synthesis schemes, and should be called when the task around a material synthesis topic.",
@@ -89,7 +89,8 @@ def create_scientist_team(user_input_func: Callable[[str, Optional[CancellationT
Always handoff back to Scientist_Admin when synthesis scheme is complete.
Let's think step by step and answer with {lang}:
""",
tools=[hybird_retrieval_from_knowledge_base, search_from_oqmd_by_composition, graph_rag_search],
# tools=[hybird_retrieval_from_knowledge_base, search_from_oqmd_by_composition, graph_rag_search],
tools=[hybird_retrieval_from_knowledge_base, search_from_oqmd_by_composition],
reflect_on_tool_use=True,
handoffs=["Scientist_Admin"]
)