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 13, 2024
1 parent 9118d86 commit 38421e3
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 @@ -99,11 +99,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 38421e3

Please sign in to comment.