Skip to content

Commit

Permalink
fix: Fix job ID
Browse files Browse the repository at this point in the history
  • Loading branch information
whiterabbit1983 committed Sep 14, 2024
1 parent c93c13c commit 1b3e5dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agents-api/agents_api/routers/sessions/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,12 @@ async def chat(
if isinstance(model_response, ModelResponse):
total_tokens = model_response.usage.total_tokens

job_id = uuid4()

if (
chat_context.session.token_budget is not None
and total_tokens >= chat_context.session.token_budget
):
job_id = uuid4()
if chat_context.session.context_overflow == "adaptive":
await run_summarization_task(session_id=session_id, job_id=job_id)
elif chat_context.session.context_overflow == "truncate":
Expand Down

0 comments on commit 1b3e5dd

Please sign in to comment.