fix: ensure user_id is passed in context to harnessed_agent tools
This commit is contained in:
parent
518f174926
commit
564084f3c8
Binary file not shown.
@ -162,7 +162,7 @@ class HermesReasoningEngine:
|
|||||||
|
|
||||||
async def _get_memory_context(self, user_id: str, request: str, config: Dict) -> Dict[str, Any]:
|
async def _get_memory_context(self, user_id: str, request: str, config: Dict) -> Dict[str, Any]:
|
||||||
"""Get real memory and session context from harnessed_agent."""
|
"""Get real memory and session context from harnessed_agent."""
|
||||||
context = {"memory_entries": [], "recent_sessions": [], "skills": []}
|
context = {"user_id": user_id, "memory_entries": [], "recent_sessions": [], "skills": []}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Intelligent memory
|
# Intelligent memory
|
||||||
@ -453,6 +453,7 @@ class HermesReasoningEngine:
|
|||||||
# Step 1: Gather real context
|
# Step 1: Gather real context
|
||||||
info(f"Reasoning start: user={user_id}, request={request[:80]}...")
|
info(f"Reasoning start: user={user_id}, request={request[:80]}...")
|
||||||
context = await self._get_memory_context(user_id, request, config)
|
context = await self._get_memory_context(user_id, request, config)
|
||||||
|
context['user_id'] = user_id # Ensure user_id is available for tool execution
|
||||||
|
|
||||||
# Step 2: LLM-based planning
|
# Step 2: LLM-based planning
|
||||||
plan = await self._generate_plan(request, context, config)
|
plan = await self._generate_plan(request, context, config)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user