Skip to content

Commit 21814b2

Browse files
Added gpt-4o (#793)
* Added gpt-4o Updated for use with the new open ai model * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 94f3e1b commit 21814b2

File tree

1 file changed

+3
-0
lines changed
  • packages/jupyter-ai-magics/jupyter_ai_magics/partner_providers

1 file changed

+3
-0
lines changed

packages/jupyter-ai-magics/jupyter_ai_magics/partner_providers/openai.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def is_api_key_exc(cls, e: Exception):
2525
return False
2626

2727

28+
# https://platform.openai.com/docs/models/
2829
class ChatOpenAIProvider(BaseProvider, ChatOpenAI):
2930
id = "openai-chat"
3031
name = "OpenAI"
@@ -37,12 +38,14 @@ class ChatOpenAIProvider(BaseProvider, ChatOpenAI):
3738
"gpt-3.5-turbo-16k",
3839
"gpt-3.5-turbo-16k-0613", # Deprecated as of 2024-06-13
3940
"gpt-4",
41+
"gpt-4-turbo",
4042
"gpt-4-turbo-preview",
4143
"gpt-4-0613",
4244
"gpt-4-32k",
4345
"gpt-4-32k-0613",
4446
"gpt-4-0125-preview",
4547
"gpt-4-1106-preview",
48+
"gpt-4o",
4649
]
4750
model_id_key = "model_name"
4851
pypi_package_deps = ["langchain_openai"]

0 commit comments

Comments
 (0)