Skip to content

Commit

Permalink
Revert changes to router
Browse files Browse the repository at this point in the history
  • Loading branch information
homanp committed Feb 19, 2024
1 parent ad35ca4 commit 972787d
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions service/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 972787d

Please sign in to comment.