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

Fix token counting if stream=false #216

Merged
merged 2 commits into from
Apr 13, 2023

Conversation

AlexHTW
Copy link
Contributor

@AlexHTW AlexHTW commented Apr 12, 2023

fixes #211 #212

total_tokens was not used within the __reply() function and not accessible in line 486 to be added to the users token count, throwing the undefined exception in line 491.
changed the scope of total_tokens as nonlocal

@AlexHTW AlexHTW mentioned this pull request Apr 12, 2023
@n3d1117
Copy link
Owner

n3d1117 commented Apr 13, 2023

Ugh, my python is bad... thanks @AlexHTW 😃

@n3d1117 n3d1117 merged commit 980aa15 into n3d1117:main Apr 13, 2023
@AlexHTW AlexHTW deleted the fix-token-count-if-stream-false branch April 25, 2023 22:44
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.

The file with user logs is not created in the folder usage_los when STREAM = "False"
2 participants