docs updated

This commit is contained in:
serversdwn
2025-11-28 18:05:59 -05:00
parent a83405beb1
commit d9281a1816
12 changed files with 557 additions and 477 deletions

View File

@@ -0,0 +1 @@
# Ingest module - handles communication with Intake service

View File

@@ -8,9 +8,14 @@ class IntakeClient:
"""Handles short-term / episodic summaries from Intake service."""
def __init__(self):
self.base_url = os.getenv("INTAKE_API", "http://intake:7083")
self.base_url = os.getenv("INTAKE_API_URL", "http://intake:7080")
async def summarize_turn(self, session_id: str, user_msg: str, assistant_msg: Optional[str] = None) -> Dict[str, Any]:
"""
DEPRECATED: Intake v0.2 removed the /summarize endpoint.
Use add_exchange() instead, which auto-summarizes in the background.
This method is kept for backwards compatibility but will fail.
"""
payload = {
"session_id": session_id,
"turns": [{"role": "user", "content": user_msg}]
@@ -24,15 +29,17 @@ class IntakeClient:
r.raise_for_status()
return r.json()
except Exception as e:
logger.warning(f"Intake summarize_turn failed: {e}")
logger.warning(f"Intake summarize_turn failed (endpoint removed in v0.2): {e}")
return {}
async def get_context(self, session_id: str) -> str:
"""Get summarized context for a session from Intake."""
async with httpx.AsyncClient(timeout=15) as client:
try:
r = await client.get(f"{self.base_url}/context/{session_id}")
r = await client.get(f"{self.base_url}/summaries", params={"session_id": session_id})
r.raise_for_status()
return r.text
data = r.json()
return data.get("summary_text", "")
except Exception as e:
logger.warning(f"Intake get_context failed: {e}")
return ""

1
cortex/llm/__init__.py Normal file
View File

@@ -0,0 +1 @@
# LLM module - provides LLM routing and backend abstraction

View File

@@ -0,0 +1 @@
# Persona module - applies Lyra's personality and speaking style

View File

@@ -0,0 +1 @@
# Reasoning module - multi-stage reasoning pipeline

View File

@@ -1,6 +1,5 @@
# router.py
from unittest import result
from fastapi import APIRouter, HTTPException
from pydantic import BaseModel

1
cortex/utils/__init__.py Normal file
View File

@@ -0,0 +1 @@
# Utilities module