llama-index-llms-openai 0.3.11__py3-none-any.whl → 0.3.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- llama_index/llms/openai/base.py +1 -1
- llama_index/llms/openai/py.typed +0 -0
- llama_index/llms/openai/utils.py +8 -3
- {llama_index_llms_openai-0.3.11.dist-info → llama_index_llms_openai-0.3.13.dist-info}/METADATA +1 -1
- llama_index_llms_openai-0.3.13.dist-info/RECORD +7 -0
- llama_index_llms_openai-0.3.11.dist-info/RECORD +0 -6
- {llama_index_llms_openai-0.3.11.dist-info → llama_index_llms_openai-0.3.13.dist-info}/WHEEL +0 -0
llama_index/llms/openai/base.py
CHANGED
|
@@ -170,7 +170,7 @@ class OpenAI(FunctionCallingLLM):
|
|
|
170
170
|
default=DEFAULT_TEMPERATURE,
|
|
171
171
|
description="The temperature to use during generation.",
|
|
172
172
|
ge=0.0,
|
|
173
|
-
le=
|
|
173
|
+
le=2.0,
|
|
174
174
|
)
|
|
175
175
|
max_tokens: Optional[int] = Field(
|
|
176
176
|
description="The maximum number of tokens to generate.",
|
|
File without changes
|
llama_index/llms/openai/utils.py
CHANGED
|
@@ -42,6 +42,13 @@ O1_MODELS: Dict[str, int] = {
|
|
|
42
42
|
"o1-mini-2024-09-12": 128000,
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
O1_MODELS_WITHOUT_FUNCTION_CALLING = {
|
|
46
|
+
"o1-preview",
|
|
47
|
+
"o1-preview-2024-09-12",
|
|
48
|
+
"o1-mini",
|
|
49
|
+
"o1-mini-2024-09-12",
|
|
50
|
+
}
|
|
51
|
+
|
|
45
52
|
GPT4_MODELS: Dict[str, int] = {
|
|
46
53
|
# stable model names:
|
|
47
54
|
# resolves to gpt-4-0314 before 2023-06-27,
|
|
@@ -247,9 +254,7 @@ def is_function_calling_model(model: str) -> bool:
|
|
|
247
254
|
|
|
248
255
|
is_chat_model_ = is_chat_model(model)
|
|
249
256
|
is_old = "0314" in model or "0301" in model
|
|
250
|
-
|
|
251
|
-
# TODO: This is temporary for openai's beta
|
|
252
|
-
is_o1_beta = "o1" in model
|
|
257
|
+
is_o1_beta = model in O1_MODELS_WITHOUT_FUNCTION_CALLING
|
|
253
258
|
|
|
254
259
|
return is_chat_model_ and not is_old and not is_o1_beta
|
|
255
260
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
llama_index/llms/openai/__init__.py,sha256=vm3cIBSGkBFlE77GyfyN0EhpJcnJZN95QMhPN53EkbE,148
|
|
2
|
+
llama_index/llms/openai/base.py,sha256=uvYlJz3TXZIsptoicHCSv8zIc8wK187RhY1lwU7lOVc,35777
|
|
3
|
+
llama_index/llms/openai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
llama_index/llms/openai/utils.py,sha256=xGmeX1TbJaLjdtryETTGHR3-OSdrBm-79UxC9FlrrdE,18563
|
|
5
|
+
llama_index_llms_openai-0.3.13.dist-info/METADATA,sha256=L9Uc2A1uxhFVX-GNzUo1OFssYWg6HTgSO0ZEeIVNDeo,3321
|
|
6
|
+
llama_index_llms_openai-0.3.13.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
7
|
+
llama_index_llms_openai-0.3.13.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
llama_index/llms/openai/__init__.py,sha256=vm3cIBSGkBFlE77GyfyN0EhpJcnJZN95QMhPN53EkbE,148
|
|
2
|
-
llama_index/llms/openai/base.py,sha256=_kW22tTABTKQ-GFRN00P5OOcJS4IeVAI3vPqbjw1D8o,35777
|
|
3
|
-
llama_index/llms/openai/utils.py,sha256=cHtOBsMQFHoX1MKu4BBB49YcXg4i5uUC6rOuXdxYixw,18452
|
|
4
|
-
llama_index_llms_openai-0.3.11.dist-info/METADATA,sha256=o6jHbJGHQDT26jsV0oluYiE-qmI6F7US_WnCGbGtd_U,3321
|
|
5
|
-
llama_index_llms_openai-0.3.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
6
|
-
llama_index_llms_openai-0.3.11.dist-info/RECORD,,
|
|
File without changes
|