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

Tweak o1 function calling reqs #17328

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@
"o1-mini-2024-09-12": 128000,
}

O1_MODELS_WITHOUT_FUNCTION_CALLING = {
"o1-preview",
"o1-preview-2024-09-12",
"o1-mini",
"o1-mini-2024-09-12",
}

GPT4_MODELS: Dict[str, int] = {
# stable model names:
# resolves to gpt-4-0314 before 2023-06-27,
Expand Down Expand Up @@ -247,9 +254,7 @@ def is_function_calling_model(model: str) -> bool:

is_chat_model_ = is_chat_model(model)
is_old = "0314" in model or "0301" in model

# TODO: This is temporary for openai's beta
is_o1_beta = "o1" in model
is_o1_beta = model in O1_MODELS_WITHOUT_FUNCTION_CALLING

return is_chat_model_ and not is_old and not is_o1_beta

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exclude = ["**/BUILD"]
license = "MIT"
name = "llama-index-llms-openai"
readme = "README.md"
version = "0.3.11"
version = "0.3.12"

[tool.poetry.dependencies]
python = ">=3.9,<4.0"
Expand Down
Loading