Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
add ai models input view
trohitg912404a05deb
diff --git a/server/core/cache.py b/server/core/cache.pyindex 28166778..8424204f 100644--- a/server/core/cache.py+++ b/server/core/cache.py@@ -301,9 +301,12 @@ class CacheService:"""try:if self.use_redis and self.redis and self._streams_available:- # Serialize data to JSON string for storage- serialized = {k: json.dumps(v) if isinstance(v, (dict, list)) else str(v)- for k, v in data.items()}+ # Serialize ALL values with json.dumps to preserve types+ # This matches the pattern used in set() and ensures proper round-trip:+ # - json.dumps(True) → "true" (lowercase, valid JSON)+ # - json.loads("true") → True (Python bool)+ # Using str() would break: str(True) → "True" → json.loads fails+ serialized = {k: json.dumps(v, default=str) for k, v in data.items()}msg_id = await self.redis.xadd(stream, serialized, maxlen=maxlen, approximate=True)logger.debug(f"Stream add: {stream} -> {msg_id}")return msg_iddiff --git a/server/services/ai.py b/server/services/ai.pyindex 3cdd6bc9..568a11f0 100644--- a/server/services/ai.py+++ b/server/services/ai.py@@ -338,7 +338,11 @@ class AIService:"model": model,"provider": provider,"finish_reason": "stop",- "timestamp": datetime.now().isoformat()+ "timestamp": datetime.now().isoformat(),+ "input": {+ "prompt": prompt,+ "system_prompt": system_prompt,+ }}log_execution_time(logger, "ai_chat", start_time, time.time())@@ -547,7 +551,11 @@ class AIService:"agent_type": "langgraph","iterations": iterations,"finish_reason": "stop",- "timestamp": datetime.now().isoformat()+ "timestamp": datetime.now().isoformat(),+ "input": {+ "prompt": prompt,+ "system_message": system_message,+ }}# Add memory info if used