mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
tuning
This commit is contained in:
@@ -35,7 +35,9 @@ class ToolActivities:
|
|||||||
try:
|
try:
|
||||||
data = json.loads(response.message.content)
|
data = json.loads(response.message.content)
|
||||||
except json.JSONDecodeError as e:
|
except json.JSONDecodeError as e:
|
||||||
raise ApplicationError(f"Invalid JSON: {e}")
|
print(f"Invalid JSON: {e}")
|
||||||
|
print(response.message.content)
|
||||||
|
raise json.JSONDecodeError
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ def generate_genai_prompt(
|
|||||||
prompt_lines.append(
|
prompt_lines.append(
|
||||||
"6. Use 'next': 'question' if you lack any required arguments based on the history and prompt. "
|
"6. Use 'next': 'question' if you lack any required arguments based on the history and prompt. "
|
||||||
"Use 'next': 'confirm' only if NO arguments are missing. "
|
"Use 'next': 'confirm' only if NO arguments are missing. "
|
||||||
"Use 'next': 'done' if no more tool calls are needed."
|
"Use 'next': 'done' and tool: 'null' if you have successfully completed all tools."
|
||||||
|
"Don't offer any additional tools beyond the tools listed."
|
||||||
)
|
)
|
||||||
prompt_lines.append(
|
prompt_lines.append(
|
||||||
"7. Keep 'response' user-friendly with no extra commentary. Stick to valid JSON syntax. "
|
"7. Keep 'response' user-friendly with no extra commentary. Stick to valid JSON syntax. "
|
||||||
|
|||||||
Reference in New Issue
Block a user