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 - missing total token count calculation for maintain_format = False #32

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

pradhyumna85
Copy link
Contributor

Fixes #31

@pradhyumna85
Copy link
Contributor Author

pradhyumna85 commented Sep 11, 2024

@annapo23, @tylermaran, @xdotli Could you please review this PR?

@xdotli
Copy link
Contributor

xdotli commented Sep 11, 2024

@annapo23, @tylermaran, @xdotli Could you please review this PR?

@pradhyumna85 taking a look now

Copy link
Contributor

@tylermaran tylermaran left a comment

Choose a reason for hiding this comment

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

Hey @pradhyumna85, good catch and this one looks pretty simple!
Going to go ahead and merge.

@@ -123,6 +123,10 @@ async def zerox(

aggregated_markdown = [result[0] for result in results if isinstance(result[0], str)]

## add token usage
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: double ##

@tylermaran tylermaran merged commit 154238c into getomni-ai:main Sep 12, 2024
@pradhyumna85 pradhyumna85 deleted the pysdk-token-count-fix branch September 12, 2024 07:32
namtho7078 pushed a commit to namtho7078/zerox that referenced this pull request Oct 27, 2024
…se (getomni-ai#32)

Co-authored-by: Pradyumna Singh Rathore <pradyumna.singhrathore@halliburton.com>
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.

Zerox output always contains 0 input and output token count in python sdk (for maintain_format = False)
3 participants