mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-07-08 11:56:59 +00:00
Fix merged test regressions
This commit is contained in:
@@ -1359,9 +1359,11 @@ def setup_chat_routes(
|
||||
elif chunk.startswith("event: "):
|
||||
yield chunk
|
||||
elif chunk == "data: [DONE]\n\n":
|
||||
if full_response:
|
||||
_has_tool_events = bool((last_metrics or {}).get("tool_events"))
|
||||
if full_response or _has_tool_events:
|
||||
_response_to_save = full_response or "Done."
|
||||
_saved_id = save_assistant_response(
|
||||
sess, session_manager, session, full_response, last_metrics,
|
||||
sess, session_manager, session, _response_to_save, last_metrics,
|
||||
character_name=ctx.preset.character_name,
|
||||
web_sources=web_sources,
|
||||
rag_sources=ctx.rag_sources,
|
||||
@@ -1371,7 +1373,7 @@ def setup_chat_routes(
|
||||
if _saved_id:
|
||||
yield f'data: {json.dumps({"type": "message_saved", "id": _saved_id})}\n\n'
|
||||
run_post_response_tasks(
|
||||
sess, session_manager, session, message, full_response,
|
||||
sess, session_manager, session, message, _response_to_save,
|
||||
last_metrics, ctx.uprefs, memory_manager, memory_vector, webhook_manager,
|
||||
incognito=incognito, compare_mode=compare_mode,
|
||||
character_name=ctx.preset.character_name,
|
||||
|
||||
@@ -2388,6 +2388,8 @@ def setup_email_routes():
|
||||
owner: str = Depends(require_owner),
|
||||
):
|
||||
"""Read email body. Cached for 30m, sync IMAP work runs in a thread."""
|
||||
mark_seen = True if mark_seen is True or str(mark_seen).lower() == "true" else False
|
||||
full = True if full is True or str(full).lower() == "true" else False
|
||||
fixture_result = _fixture_email_read(uid, folder, owner)
|
||||
if fixture_result is not None:
|
||||
return fixture_result
|
||||
|
||||
@@ -218,6 +218,8 @@ def _default_endpoint_needs_assignment(
|
||||
return True
|
||||
if current_default_id not in enabled_endpoint_ids:
|
||||
return True
|
||||
if current_default_endpoint is None:
|
||||
return False
|
||||
if not (current_default_model or "").strip():
|
||||
return True
|
||||
visible = _endpoint_visible_model_ids(current_default_endpoint)
|
||||
|
||||
@@ -137,6 +137,8 @@ def setup_upload_routes(upload_handler):
|
||||
session_id: Optional[str] = Form(None),
|
||||
):
|
||||
"""Upload files with enhanced security and organization."""
|
||||
if not isinstance(session_id, str):
|
||||
session_id = None
|
||||
if not files:
|
||||
raise HTTPException(400, "No files uploaded")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user