From 972787d897cc5690c4893202c86b942744d11523 Mon Sep 17 00:00:00 2001 From: Ismail Pelaseyed Date: Mon, 19 Feb 2024 08:29:24 -0800 Subject: [PATCH] Revert changes to router --- service/router.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/service/router.py b/service/router.py index 3a7f6947..b21c16b6 100644 --- a/service/router.py +++ b/service/router.py @@ -56,21 +56,21 @@ async def query(payload: RequestPayload) -> list[BaseDocumentChunk]: ) return await get_documents(vector_service=vector_service, payload=payload) - # vector_service: BaseVectorDatabase = get_vector_service( - # index_name=payload.index_name, - # credentials=payload.vector_database, - # encoder=encoder, - # ) + vector_service: BaseVectorDatabase = get_vector_service( + index_name=payload.index_name, + credentials=payload.vector_database, + encoder=encoder, + ) - async with CodeInterpreterService( - session_id=payload.session_id, - file_urls=[ - "https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv" - ], - ) as service: - code = "df0.info()" - output = await service.run_python(code=code) - print(output.stderr) - print(output.stdout) + # async with CodeInterpreterService( + # session_id=payload.session_id, + # file_urls=[ + # "https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv" + # ], + # ) as service: + # code = "df0.info()" + # output = await service.run_python(code=code) + # print(output.stderr) + # print(output.stdout) return await get_documents(vector_service=vector_service, payload=payload)