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.
Files changed (25) hide show
  1. {interloper_api-0.92.0 → interloper_api-0.93.0}/PKG-INFO +1 -1
  2. {interloper_api-0.92.0 → interloper_api-0.93.0}/pyproject.toml +1 -1
  3. {interloper_api-0.92.0 → interloper_api-0.93.0}/pyproject.toml.orig +1 -1
  4. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/agent.py +10 -3
  5. {interloper_api-0.92.0 → interloper_api-0.93.0}/README.md +0 -0
  6. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/__init__.py +0 -0
  7. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/app.py +0 -0
  8. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/dependencies/__init__.py +0 -0
  9. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/dependencies/auth.py +0 -0
  10. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/dependencies/rbac.py +0 -0
  11. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/dependencies/state.py +0 -0
  12. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/notifications/__init__.py +0 -0
  13. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/notifications/invitations.py +0 -0
  14. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/__init__.py +0 -0
  15. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/admin.py +0 -0
  16. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/auth.py +0 -0
  17. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/backfills.py +0 -0
  18. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/catalog.py +0 -0
  19. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/components.py +0 -0
  20. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/health.py +0 -0
  21. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/oauth.py +0 -0
  22. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/organisations.py +0 -0
  23. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/runs.py +0 -0
  24. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/tokens.py +0 -0
  25. {interloper_api-0.92.0 → interloper_api-0.93.0}/src/interloper_api/routes/websocket.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: interloper-api
3
- Version: 0.92.0
3
+ Version: 0.93.0
4
4
  Summary: Interloper FastAPI routes
5
5
  Author: Guillaume Onfroy
6
6
  Author-email: Guillaume Onfroy <guillaume@digitlcloud.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "interloper-api"
3
- version = "0.92.0"
3
+ version = "0.93.0"
4
4
  description = "Interloper FastAPI routes"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -3,7 +3,7 @@
3
3
  # ###############
4
4
  [project]
5
5
  name = "interloper-api"
6
- version = "0.92.0"
6
+ version = "0.93.0"
7
7
  description = "Interloper FastAPI routes"
8
8
  readme = "README.md"
9
9
  authors = [{ name = "Guillaume Onfroy", email = "guillaume@digitlcloud.com" }]
@@ -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
- messages = _fold_turns(VercelAIAdapter.dump_messages(history, sdk_version=SDK_VERSION))
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