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: preserve prompt_tokens_details in response model #1259

Closed
wants to merge 2 commits into from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

This fixes #1252 by properly preserving the prompt_tokens_details information from the OpenAI response in the returned model.

  • Added test to verify token caching behavior
  • Modified process_response to preserve usage information

Link to Devin run: https://app.devin.ai/sessions/d34daab99304486baa9643600abeef15

This fixes #1252 by properly preserving the prompt_tokens_details
information from the OpenAI response in the returned model.

- Added test to verify token caching behavior
- Modified process_response to preserve usage information

Link to Devin run: https://app.devin.ai/sessions/d34daab99304486baa9643600abeef15

Co-Authored-By: [email protected] <[email protected]>
Copy link

cloudflare-workers-and-pages bot commented Dec 15, 2024

Deploying instructor-py with  Cloudflare Pages  Cloudflare Pages

Latest commit: 078f40f
Status: ✅  Deploy successful!
Preview URL: https://e59c5cba.instructor-py.pages.dev
Branch Preview URL: https://devin-1734290378-fix-token-d.instructor-py.pages.dev

View logs

@devin-ai-integration devin-ai-integration bot added the bug Something isn't working label Dec 15, 2024
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

@github-actions github-actions bot added enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files. labels Dec 15, 2024
@jxnl jxnl closed this Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prompt_tokens_details not being populated correctly in response model
1 participant