mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-21 14:18:52 +00:00
openai[patch], community[patch]: add pricing and max context window for GPT-4o (#21673)
# Add pricing and max context window for GPT-4o - community: add cost per 1k tokens and max context window - partners: add max context window **Description:** adds static information about GPT-4o based on https://openai.com/api/pricing/ and https://platform.openai.com/docs/models/gpt-4o so that GPT-4o reporting is accurate. --------- Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com> Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
parent
bd39b2ccdf
commit
c0e3c3a350
@ -661,6 +661,8 @@ class BaseOpenAI(BaseLLM):
|
||||
max_tokens = openai.modelname_to_contextsize("gpt-3.5-turbo-instruct")
|
||||
"""
|
||||
model_token_mapping = {
|
||||
"gpt-4o": 128_000,
|
||||
"gpt-4o-2024-05-13": 128_000,
|
||||
"gpt-4": 8192,
|
||||
"gpt-4-0314": 8192,
|
||||
"gpt-4-0613": 8192,
|
||||
|
@ -537,6 +537,8 @@ class BaseOpenAI(BaseLLM):
|
||||
max_tokens = openai.modelname_to_contextsize("gpt-3.5-turbo-instruct")
|
||||
"""
|
||||
model_token_mapping = {
|
||||
"gpt-4o": 128_000,
|
||||
"gpt-4o-2024-05-13": 128_000,
|
||||
"gpt-4": 8192,
|
||||
"gpt-4-0314": 8192,
|
||||
"gpt-4-0613": 8192,
|
||||
|
Loading…
Reference in New Issue
Block a user