rm db from sessions.chat route

This commit is contained in:
Rajat Ahuja 2025-05-20 11:28:11 -04:00
parent 5ae3a92baf
commit a1c59a14fe
2 changed files with 4 additions and 7 deletions

View File

@ -224,8 +224,8 @@ async def chat(
facts, tom_inference = await asyncio.gather(
long_term_task, short_term_task
)
logger.info(f"Retrieved {len(facts)} facts from long-term memory")
logger.info(f"TOM inference completed with {len(tom_inference)} characters")
logger.debug(f"Retrieved {len(facts)} facts from long-term memory")
logger.debug(f"TOM inference completed with {len(tom_inference)} characters")
# Generate a fresh user representation
logger.debug("Generating user representation")
@ -241,7 +241,7 @@ async def chat(
message_id=latest_message_id,
with_inference=False,
)
logger.info(f"User representation generated: {len(user_representation)} characters")
logger.debug(f"User representation generated: {len(user_representation)} characters")
# Create a Dialectic chain with the fresh user representation
chain = Dialectic(
@ -251,7 +251,7 @@ async def chat(
)
generation_time = asyncio.get_event_loop().time() - start_time
logger.info(f"User representation generation completed in {generation_time:.2f}s")
logger.debug(f"User representation generation completed in {generation_time:.2f}s")
langfuse_context.update_current_trace(
session_id=session_id,

View File

@ -216,7 +216,6 @@ async def chat(
options: schemas.DialecticOptions = Body(
..., description="Dialectic Endpoint Parameters"
),
db=db,
):
"""Chat with the Dialectic API"""
@ -226,7 +225,6 @@ async def chat(
user_id=user_id,
session_id=session_id,
queries=options.queries,
db=db,
)
else:
@ -238,7 +236,6 @@ async def chat(
session_id=session_id,
queries=options.queries,
stream=True,
db=db,
)
if type(stream) is AsyncMessageStreamManager:
async with stream as stream_manager: