Skip to content

Commit

Permalink
Tweak o1 function calling reqs (#17328)
Browse files Browse the repository at this point in the history
  • Loading branch information
logan-markewich authored Dec 19, 2024
1 parent fcf32f7 commit ff19792
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
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

0 comments on commit ff19792

Please sign in to comment.