mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
use ArchFunctionConfig for agents
This commit is contained in:
parent
8104eac596
commit
1d314c8cb7
1 changed files with 7 additions and 29 deletions
|
|
@ -223,32 +223,6 @@ class ArchFunctionConfig:
|
|||
|
||||
|
||||
class ArchAgentConfig(ArchFunctionConfig):
|
||||
TASK_PROMPT = textwrap.dedent(
|
||||
"""
|
||||
You will be given a list of tools and a user request. Your task is to match the user request with the most appropriate tool(s) based on the tool descriptions. Do not explain your reasoning, just provide the tool(s) that best match the user request.
|
||||
"""
|
||||
).strip()
|
||||
|
||||
TOOL_PROMPT_TEMPLATE = textwrap.dedent(
|
||||
"""
|
||||
You will be presented with a list of tools and their descriptions:
|
||||
|
||||
<tools>
|
||||
{tool_text}
|
||||
</tools>
|
||||
"""
|
||||
).strip()
|
||||
|
||||
FORMAT_PROMPT = textwrap.dedent(
|
||||
"""
|
||||
Provide your answer in the following format:
|
||||
For each function call, return a json object with function name <tool_call></tool_call> XML tags:
|
||||
<tool_call>
|
||||
{"name": <function-name>}
|
||||
</tool_call>
|
||||
"""
|
||||
).strip()
|
||||
|
||||
GENERATION_PARAMS = {
|
||||
"temperature": 0.01,
|
||||
"stop_token_ids": [151645],
|
||||
|
|
@ -625,9 +599,13 @@ class ArchFunctionHandler(ArchBaseHandler):
|
|||
if extracted["status"]:
|
||||
# Response with tool calls
|
||||
if len(extracted["result"]):
|
||||
verified = self._verify_tool_calls(
|
||||
tools=req.tools, tool_calls=extracted["result"]
|
||||
)
|
||||
verified = {}
|
||||
if use_agent_orchestrator:
|
||||
verified = {"status": True, "message": ""}
|
||||
else:
|
||||
verified = self._verify_tool_calls(
|
||||
tools=req.tools, tool_calls=extracted["result"]
|
||||
)
|
||||
|
||||
if verified["status"]:
|
||||
logger.info(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue