Skip to content

[OpenAI]: Encoding Model #31402

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

Merged
merged 7 commits into from
Jun 10, 2025
Merged

Conversation

keenborder786
Copy link
Contributor

Copy link

vercel bot commented May 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Jun 8, 2025 1:14am

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels May 28, 2025
@keenborder786 keenborder786 changed the title [fix]: Encoding [OpenAI]: Encoding Model May 29, 2025
model = "cl100k_base"
encoding = tiktoken.get_encoding(model)
encoder = "cl100k_base"
if self.model_name.startswith("gpt-4o"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be gpt-4.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay thanks, will update

@ccurme ccurme self-assigned this May 29, 2025
Copy link

codspeed-hq bot commented May 30, 2025

CodSpeed Walltime Performance Report

Merging #31402 will not alter performance

Comparing keenborder786:fix/encoding (e7c7bab) with master (ece9e31)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 13 untouched benchmarks

Copy link

codspeed-hq bot commented May 30, 2025

CodSpeed Instrumentation Performance Report

Merging #31402 will not alter performance

Comparing keenborder786:fix/encoding (e7c7bab) with master (ece9e31)

Summary

✅ 13 untouched benchmarks

@keenborder786
Copy link
Contributor Author

@ccurme

@keenborder786
Copy link
Contributor Author

@ccurme can you please check?

@keenborder786
Copy link
Contributor Author

@ccurme

@keenborder786
Copy link
Contributor Author

@ccurme this is good to go

@keenborder786
Copy link
Contributor Author

@ccurme , please review and let me know if there is an issue

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jun 10, 2025
@ccurme ccurme merged commit 42eb356 into langchain-ai:master Jun 10, 2025
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature lgtm PR looks good. Use to confirm that a PR is ready for merging. size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants