From ebe9922ec3944365ca35765276e7f84b598f6d3d Mon Sep 17 00:00:00 2001 From: HamadaSalhab Date: Mon, 23 Dec 2024 10:01:31 +0300 Subject: [PATCH] chore: configure `sessions` router with pg queries --- agents-api/agents_api/routers/sessions/chat.py | 8 ++++---- .../routers/sessions/create_or_update_session.py | 2 +- agents-api/agents_api/routers/sessions/create_session.py | 2 +- agents-api/agents_api/routers/sessions/delete_session.py | 2 +- agents-api/agents_api/routers/sessions/get_session.py | 2 +- .../agents_api/routers/sessions/get_session_history.py | 2 +- agents-api/agents_api/routers/sessions/list_sessions.py | 2 +- agents-api/agents_api/routers/sessions/patch_session.py | 2 +- agents-api/agents_api/routers/sessions/update_session.py | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/agents-api/agents_api/routers/sessions/chat.py b/agents-api/agents_api/routers/sessions/chat.py index 7cf1110fb..63da93dcd 100644 --- a/agents-api/agents_api/routers/sessions/chat.py +++ b/agents-api/agents_api/routers/sessions/chat.py @@ -19,10 +19,10 @@ from ...common.utils.template import render_template from ...dependencies.developer_id import get_developer_data from ...env import max_free_sessions -from ...models.chat.gather_messages import gather_messages -from ...models.chat.prepare_chat_context import prepare_chat_context -from ...models.entry.create_entries import create_entries -from ...models.session.count_sessions import count_sessions as count_sessions_query +from ...queries.chat.gather_messages import gather_messages +from ...queries.chat.prepare_chat_context import prepare_chat_context +from ...queries.entries.create_entries import create_entries +from ...queries.sessions.count_sessions import count_sessions as count_sessions_query from .metrics import total_tokens_per_user from .router import router diff --git a/agents-api/agents_api/routers/sessions/create_or_update_session.py b/agents-api/agents_api/routers/sessions/create_or_update_session.py index a4efb0444..576d9d27e 100644 --- a/agents-api/agents_api/routers/sessions/create_or_update_session.py +++ b/agents-api/agents_api/routers/sessions/create_or_update_session.py @@ -9,7 +9,7 @@ ResourceUpdatedResponse, ) from ...dependencies.developer_id import get_developer_id -from ...models.session.create_or_update_session import ( +from ...queries.sessions.create_or_update_session import ( create_or_update_session as create_session_query, ) from .router import router diff --git a/agents-api/agents_api/routers/sessions/create_session.py b/agents-api/agents_api/routers/sessions/create_session.py index a83b71d5a..3dd52ac14 100644 --- a/agents-api/agents_api/routers/sessions/create_session.py +++ b/agents-api/agents_api/routers/sessions/create_session.py @@ -9,7 +9,7 @@ ResourceCreatedResponse, ) from ...dependencies.developer_id import get_developer_id -from ...models.session.create_session import create_session as create_session_query +from ...queries.sessions.create_session import create_session as create_session_query from .router import router diff --git a/agents-api/agents_api/routers/sessions/delete_session.py b/agents-api/agents_api/routers/sessions/delete_session.py index 1a664a871..a9d5450d4 100644 --- a/agents-api/agents_api/routers/sessions/delete_session.py +++ b/agents-api/agents_api/routers/sessions/delete_session.py @@ -6,7 +6,7 @@ from ...autogen.openapi_model import ResourceDeletedResponse from ...dependencies.developer_id import get_developer_id -from ...models.session.delete_session import delete_session as delete_session_query +from ...queries.sessions.delete_session import delete_session as delete_session_query from .router import router diff --git a/agents-api/agents_api/routers/sessions/get_session.py b/agents-api/agents_api/routers/sessions/get_session.py index df70a8f72..cce88071b 100644 --- a/agents-api/agents_api/routers/sessions/get_session.py +++ b/agents-api/agents_api/routers/sessions/get_session.py @@ -5,7 +5,7 @@ from ...autogen.openapi_model import Session from ...dependencies.developer_id import get_developer_id -from ...models.session.get_session import get_session as get_session_query +from ...queries.sessions.get_session import get_session as get_session_query from .router import router diff --git a/agents-api/agents_api/routers/sessions/get_session_history.py b/agents-api/agents_api/routers/sessions/get_session_history.py index fa993975b..0a76176d1 100644 --- a/agents-api/agents_api/routers/sessions/get_session_history.py +++ b/agents-api/agents_api/routers/sessions/get_session_history.py @@ -5,7 +5,7 @@ from ...autogen.openapi_model import History from ...dependencies.developer_id import get_developer_id -from ...models.entry.get_history import get_history as get_history_query +from ...queries.entries.get_history import get_history as get_history_query from .router import router diff --git a/agents-api/agents_api/routers/sessions/list_sessions.py b/agents-api/agents_api/routers/sessions/list_sessions.py index fc9cd2e99..f5a806d06 100644 --- a/agents-api/agents_api/routers/sessions/list_sessions.py +++ b/agents-api/agents_api/routers/sessions/list_sessions.py @@ -6,7 +6,7 @@ from ...autogen.openapi_model import ListResponse, Session from ...dependencies.developer_id import get_developer_id from ...dependencies.query_filter import MetadataFilter, create_filter_extractor -from ...models.session.list_sessions import list_sessions as list_sessions_query +from ...queries.sessions.list_sessions import list_sessions as list_sessions_query from .router import router diff --git a/agents-api/agents_api/routers/sessions/patch_session.py b/agents-api/agents_api/routers/sessions/patch_session.py index 8eefab4dc..eeda3af65 100644 --- a/agents-api/agents_api/routers/sessions/patch_session.py +++ b/agents-api/agents_api/routers/sessions/patch_session.py @@ -8,7 +8,7 @@ ResourceUpdatedResponse, ) from ...dependencies.developer_id import get_developer_id -from ...models.session.patch_session import patch_session as patch_session_query +from ...queries.sessions.patch_session import patch_session as patch_session_query from .router import router diff --git a/agents-api/agents_api/routers/sessions/update_session.py b/agents-api/agents_api/routers/sessions/update_session.py index f35368d84..598a2b4d8 100644 --- a/agents-api/agents_api/routers/sessions/update_session.py +++ b/agents-api/agents_api/routers/sessions/update_session.py @@ -8,7 +8,7 @@ UpdateSessionRequest, ) from ...dependencies.developer_id import get_developer_id -from ...models.session.update_session import update_session as update_session_query +from ...queries.sessions.update_session import update_session as update_session_query from .router import router