Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update session.py to fix local variable 'formatted_cost' when it is not associated with a value #441

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

knivore
Copy link
Contributor

@knivore knivore commented Oct 14, 2024

Format formatted_cost to be outside of the token_cost if else condition.

📥 Pull Request

📘 Description
Format formatted_cost block of code to shift outside of the token_cost if else condition due to the issue when there are no token_cost, formatted_cost variable is not associated with a value

🧪 Testing

Format formatted_cost to be outside of the token_cost if else condition.
Copy link
Contributor

@areibman areibman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@areibman
Copy link
Contributor

Brilliant-- thanks @knivore! Merging, we'll try to stage a release later today

@areibman areibman merged commit f5e8ec3 into AgentOps-AI:main Oct 14, 2024
1 check passed
@HowieG
Copy link
Contributor

HowieG commented Oct 16, 2024

Note: we might have expected explicitly "0" on our api server and this change now makes it 0.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants