aboutsummaryrefslogtreecommitdiff
path: root/agent/orchestrator
diff options
context:
space:
mode:
authorGuillermo Serrahima <dev@vylion.com>2026-07-01 12:42:59 +0200
committerGuillermo Serrahima <dev@vylion.com>2026-07-01 12:45:27 +0200
commitf0648d12038d4dab92a13d4f6c5063632b1a0d9d (patch)
treea4bafc0891e476ce943cb68e8b9df80dc45eefec /agent/orchestrator
parent7cc411acbf4f709e39da5eef9ecc1ab19ac3d3fa (diff)
downloadsenia-f0648d12038d4dab92a13d4f6c5063632b1a0d9d.tar.xz
senia-f0648d12038d4dab92a13d4f6c5063632b1a0d9d.zip
loop fixes and tweaks
Diffstat (limited to 'agent/orchestrator')
-rw-r--r--agent/orchestrator/api.py4
-rw-r--r--agent/orchestrator/loop.py3
2 files changed, 4 insertions, 3 deletions
diff --git a/agent/orchestrator/api.py b/agent/orchestrator/api.py
index 956f7b5..e91ea36 100644
--- a/agent/orchestrator/api.py
+++ b/agent/orchestrator/api.py
@@ -5,7 +5,7 @@ the standard `/v1/chat/completions` shape, translate to internal types, hand
off to the orchestrator, and translate the response back to OpenAI shape.
"""
-from fastapi import FastAPI, HTTPException
+from fastapi import FastAPI, HTTPException, Request
from pydantic import BaseModel, ConfigDict
from .loop import handle_turn
@@ -36,7 +36,7 @@ def list_models():
@app.post("/v1/chat/completions")
-def chat_completions(req: ChatCompletionRequest):
+def chat_completions(req: ChatCompletionRequest, request: Request):
# Open WebUI sends user info via custom headers when ENABLE_FORWARD_USER_INFO_HEADERS=true
user_name = request.headers.get("x-openwebui-user-name")
user_email = request.headers.get("x-openwebui-user-email")
diff --git a/agent/orchestrator/loop.py b/agent/orchestrator/loop.py
index 07e81e8..111bf6c 100644
--- a/agent/orchestrator/loop.py
+++ b/agent/orchestrator/loop.py
@@ -5,12 +5,13 @@ the response. As capabilities grow (memory recall, routing per intent, channel
adapters) they hang off this function.
"""
+from datetime import datetime
from .context import build_turn_context
from .models import Message, ModelRequest, call_model
def handle_turn(messages: list[Message], user: str | None = None) -> str:
- decorated = _decorate_latest_user(messages, user)
+ #decorated = _decorate_latest_user(messages, user)
request = ModelRequest(
messages=messages,
turn_context=build_turn_context(),