interloper-api 0.92.0__tar.gz → 0.93.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {interloper_api-0.92.0 → interloper_api-0.93.0}/PKG-INFO +1 -1
- {interloper_api-0.92.0 → interloper_api-0.93.0}/pyproject.toml +1 -1
- {interloper_api-0.92.0 → interloper_api-0.93.0}/pyproject.toml.orig +1 -1
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/agent.py +10 -3
- {interloper_api-0.92.0 → interloper_api-0.93.0}/README.md +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/__init__.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/app.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/dependencies/__init__.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/dependencies/auth.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/dependencies/rbac.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/dependencies/state.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/notifications/__init__.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/notifications/invitations.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/__init__.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/admin.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/auth.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/backfills.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/catalog.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/components.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/health.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/oauth.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/organisations.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/runs.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/tokens.py +0 -0
- {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/websocket.py +0 -0
|
@@ -19,7 +19,7 @@ from typing import Any
|
|
|
19
19
|
from uuid import UUID
|
|
20
20
|
|
|
21
21
|
from fastapi import APIRouter, Request, Response
|
|
22
|
-
from interloper_agent import TURN_LIMITS
|
|
22
|
+
from interloper_agent import TURN_LIMITS, summary_of
|
|
23
23
|
from interloper_db.models import Conversation
|
|
24
24
|
from interloper_toolkit import ToolkitContext
|
|
25
25
|
from pydantic import BaseModel
|
|
@@ -102,8 +102,13 @@ class ConversationResponse(BaseModel):
|
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
class ConversationDetailResponse(ConversationResponse):
|
|
105
|
-
"""A conversation with its history in the AI SDK's ``UIMessage`` shape.
|
|
105
|
+
"""A conversation with its history in the AI SDK's ``UIMessage`` shape.
|
|
106
106
|
|
|
107
|
+
``summary`` is what the older turns were compacted into, when they were;
|
|
108
|
+
the messages then start where the summary ends.
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
summary: str | None
|
|
107
112
|
messages: list[dict[str, Any]]
|
|
108
113
|
|
|
109
114
|
@classmethod
|
|
@@ -117,9 +122,11 @@ class ConversationDetailResponse(ConversationResponse):
|
|
|
117
122
|
The response model, its messages as the app's ``useChat`` loads them.
|
|
118
123
|
"""
|
|
119
124
|
history = ModelMessagesTypeAdapter.validate_python(conversation.messages)
|
|
120
|
-
|
|
125
|
+
dumped = VercelAIAdapter.dump_messages(history, sdk_version=SDK_VERSION)
|
|
126
|
+
messages = _fold_turns([message for message in dumped if message.role != "system"])
|
|
121
127
|
return cls(
|
|
122
128
|
**ConversationResponse.from_conversation(conversation).model_dump(),
|
|
129
|
+
summary=summary_of(history),
|
|
123
130
|
messages=[message.model_dump(by_alias=True, exclude_none=True) for message in messages],
|
|
124
131
|
)
|
|
125
132
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/notifications/__init__.py
RENAMED
|
File without changes
|
{interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/notifications/invitations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|