Skip to content

Commit 507f048

Browse files
committed
Conversation API added
1 parent db97226 commit 507f048

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

openhands_server/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
event_webhook_router,
1616
)
1717
from openhands_server.sandbox import sandbox_router, sandbox_spec_router
18+
from openhands_server.sandboxed_conversation import sandboxed_conversation_router
1819
from openhands_server.user import user_router
1920

2021

@@ -46,8 +47,9 @@ async def _api_lifespan(api: FastAPI) -> AsyncIterator[None]:
4647
api_router.include_router(event_router.router)
4748
api_router.include_router(event_callback_router.router)
4849
api_router.include_router(event_callback_result_router.router)
49-
api_router.include_router(sandbox_spec_router.router)
50+
api_router.include_router(sandboxed_conversation_router.router)
5051
api_router.include_router(sandbox_router.router)
52+
api_router.include_router(sandbox_spec_router.router)
5153
api_router.include_router(user_router.router)
5254
api.include_router(api_router)
5355
api.include_router(event_webhook_router.router)

openhands_server/sandboxed_conversation/sandboxed_conversation_router.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
)
1717

1818

19-
router = APIRouter(prefix="/sandboxed-conversations")
19+
router = APIRouter(prefix="/sandboxed-conversations", tags=["Conversations"])
2020
sandboxed_conversation_service_dependency = Depends(
2121
get_dependency_resolver().sandboxed_conversation.get_resolver_for_user()
2222
)
@@ -33,7 +33,9 @@ async def search_sandboxed_conversations(
3333
limit: Annotated[
3434
int,
3535
Query(
36-
title="The max number of results in the page", gt=0, lte=100, default=100
36+
title="The max number of results in the page",
37+
gt=0,
38+
lte=100,
3739
),
3840
] = 100,
3941
sandboxed_conversation_service: SandboxedConversationService = (

0 commit comments

Comments
 (0)