mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-16 08:25:18 +02:00
fix: pass system_instruction to one shot llm inferences to avoid system instruction from llm _settings
This commit is contained in:
parent
70730616ec
commit
dcf9bf7c4b
2 changed files with 6 additions and 10 deletions
|
|
@ -148,14 +148,13 @@ async def ensure_node_summaries(
|
|||
node_info_parts.append("Available tools:\n" + "\n".join(tool_descriptions))
|
||||
node_info = "\n".join(node_info_parts)
|
||||
messages = [
|
||||
{"role": "system", "content": NODE_SUMMARY_SYSTEM_PROMPT},
|
||||
{"role": "user", "content": node_info},
|
||||
]
|
||||
|
||||
try:
|
||||
context = LLMContext()
|
||||
context.set_messages(messages)
|
||||
summary_text = await llm.run_inference(context) or ""
|
||||
summary_text = await llm.run_inference(context, system_instruction=NODE_SUMMARY_SYSTEM_PROMPT) or ""
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to generate summary for node {node_id}: {e}")
|
||||
updated_summaries[node_id] = {"summary": ""}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue