rowboat icon indicating copy to clipboard operation
rowboat copied to clipboard

Fix AttributeError when usage is None for non-Openai models

Open dhawansolanki opened this issue 6 months ago • 2 comments
trafficstars

Issue #113 The code is trying to access event.data.response.usage.total_tokens at apps/rowboat_agents/src/graph/core.py , but event.data.response.usage is None. This happens when the response object does not include usage information for non-OpenAI models like Azure OpenAI.

Fix: Adding a guard clause before accessing total_tokens to prevent the AttributeError when usage is None.

dhawansolanki avatar May 12 '25 12:05 dhawansolanki

@dhawansolanki is attempting to deploy a commit to the RowBoat Labs Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar May 12 '25 12:05 vercel[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 12 '25 12:05 CLAassistant