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 model token mappings/cost to include 0613 models #6122

Merged
merged 4 commits into from
Jun 21, 2023

Conversation

eoriont
Copy link
Contributor

@eoriont eoriont commented Jun 13, 2023

Add gpt-3.5-turbo-16k to model token mappings, as per the following new OpenAI blog post:
https://openai.com/blog/function-calling-and-other-api-updates

Fixes #6118

Before submitting

Each example using gpt-3.5-turbo should already work, and I think shouldn't be updated as the new 16k token model costs more per token to use.

If there are tests I should add, please let me know.

Who can review?

Tag maintainers/contributors who might be interested:

@hwchase17

@mheguy-stingray
Copy link
Contributor

@eoriont Could you also add the tokens for the 0613 models?
That would be:
gpt-4-32k-0613, gpt-4-0613, gpt-3.5-turbo-0613, and gpt-3.5-turbo-16k-0613

@eoriont eoriont changed the title Update model token mappings to include gpt-3.5-turbo-16k Update model token mappings/cost to include gpt-3.5-turbo-16k Jun 14, 2023
@eoriont eoriont changed the title Update model token mappings/cost to include gpt-3.5-turbo-16k Update model token mappings/cost to include 0613 models Jun 14, 2023
@eoriont
Copy link
Contributor Author

eoriont commented Jun 17, 2023

This also fixes #6150. Any thoughts @hwchase17 @agola11?

@vercel
Copy link

vercel bot commented Jun 18, 2023

@hwchase17 is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jun 21, 2023

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

Name Status Preview Comments Updated (UTC)
langchain 🛑 Canceled (Inspect) Jun 21, 2023 8:33am

@dev2049
Copy link
Contributor

dev2049 commented Jun 21, 2023

thanks @eoriont!

@dev2049 dev2049 added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jun 21, 2023
@dev2049 dev2049 merged commit e0f468f into langchain-ai:master Jun 21, 2023
12 of 13 checks passed
tconkling added a commit to tconkling/langchain that referenced this pull request Jun 21, 2023
* master: (28 commits)
  [Feature][VectorStore] Support StarRocks as vector db (langchain-ai#6119)
  Relax string input mapper check (langchain-ai#6544)
  bump to ver 208 (langchain-ai#6540)
  Harrison/multi tool (langchain-ai#6518)
  Infino integration for simplified logs, metrics & search across LLM data & token usage (langchain-ai#6218)
  Update model token mappings/cost to include 0613 models (langchain-ai#6122)
  Fix issue with non-list `To` header in GmailSendMessage Tool (langchain-ai#6242)
  Integrate Rockset as Vectorstore (langchain-ai#6216)
  Feat: Add a prompt template parameter to qa with structure chains (langchain-ai#6495)
  Add async support for HuggingFaceTextGenInference (langchain-ai#6507)
  Be able to use Codey models on Vertex AI (langchain-ai#6354)
  Add KuzuQAChain (langchain-ai#6454)
  Update index.mdx (langchain-ai#6326)
  Export trajectory eval fn (langchain-ai#6509)
  typo(llamacpp.ipynb): 'condiser' -> 'consider' (langchain-ai#6474)
  Fix typo in docstring of format_tool_to_openai_function (langchain-ai#6479)
  Make streamlit import optional (langchain-ai#6510)
  Fixed: 'readible' -> readable (langchain-ai#6492)
  Documentation Fix: Correct the example code output in the prompt templates doc (langchain-ai#6496)
  Fix link (langchain-ai#6501)
  ...
This was referenced Jun 25, 2023
kacperlukawski pushed a commit to kacperlukawski/langchain that referenced this pull request Jun 29, 2023
…#6122)

Add `gpt-3.5-turbo-16k` to model token mappings, as per the following
new OpenAI blog post:
https://openai.com/blog/function-calling-and-other-api-updates

Fixes langchain-ai#6118 


Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
aerrober pushed a commit to aerrober/langchain-fork that referenced this pull request Jul 24, 2023
…#6122)

Add `gpt-3.5-turbo-16k` to model token mappings, as per the following
new OpenAI blog post:
https://openai.com/blog/function-calling-and-other-api-updates

Fixes langchain-ai#6118 


Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PR looks good. Use to confirm that a PR is ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue: Update OpenAI model token mapping to reflect new API update 2023-06-13
4 participants