llama-index-llms-openai 0.2.4__py3-none-any.whl → 0.2.6__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 +10 -6
- {llama_index_llms_openai-0.2.4.dist-info → llama_index_llms_openai-0.2.6.dist-info}/METADATA +1 -1
- llama_index_llms_openai-0.2.6.dist-info/RECORD +6 -0
- llama_index_llms_openai-0.2.4.dist-info/RECORD +0 -6
- {llama_index_llms_openai-0.2.4.dist-info → llama_index_llms_openai-0.2.6.dist-info}/WHEEL +0 -0
llama_index/llms/openai/base.py
CHANGED
|
@@ -167,8 +167,8 @@ class OpenAI(FunctionCallingLLM):
|
|
|
167
167
|
temperature: float = Field(
|
|
168
168
|
default=DEFAULT_TEMPERATURE,
|
|
169
169
|
description="The temperature to use during generation.",
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
ge=0.0,
|
|
171
|
+
le=1.0,
|
|
172
172
|
)
|
|
173
173
|
max_tokens: Optional[int] = Field(
|
|
174
174
|
description="The maximum number of tokens to generate.",
|
|
@@ -181,8 +181,8 @@ class OpenAI(FunctionCallingLLM):
|
|
|
181
181
|
top_logprobs: int = Field(
|
|
182
182
|
description="The number of top token log probs to return.",
|
|
183
183
|
default=0,
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
ge=0,
|
|
185
|
+
le=20,
|
|
186
186
|
)
|
|
187
187
|
additional_kwargs: Dict[str, Any] = Field(
|
|
188
188
|
default_factory=dict, description="Additional kwargs for the OpenAI API."
|
|
@@ -190,12 +190,12 @@ class OpenAI(FunctionCallingLLM):
|
|
|
190
190
|
max_retries: int = Field(
|
|
191
191
|
default=3,
|
|
192
192
|
description="The maximum number of API retries.",
|
|
193
|
-
|
|
193
|
+
ge=0,
|
|
194
194
|
)
|
|
195
195
|
timeout: float = Field(
|
|
196
196
|
default=60.0,
|
|
197
197
|
description="The timeout, in seconds, for API requests.",
|
|
198
|
-
|
|
198
|
+
ge=0,
|
|
199
199
|
)
|
|
200
200
|
default_headers: Optional[Dict[str, str]] = Field(
|
|
201
201
|
default=None, description="The default headers for API requests."
|
|
@@ -254,6 +254,10 @@ class OpenAI(FunctionCallingLLM):
|
|
|
254
254
|
api_version=api_version,
|
|
255
255
|
)
|
|
256
256
|
|
|
257
|
+
# TODO: Temp forced to 1.0 for o1
|
|
258
|
+
if model in O1_MODELS:
|
|
259
|
+
temperature = 1.0
|
|
260
|
+
|
|
257
261
|
super().__init__(
|
|
258
262
|
model=model,
|
|
259
263
|
temperature=temperature,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
llama_index/llms/openai/__init__.py,sha256=vm3cIBSGkBFlE77GyfyN0EhpJcnJZN95QMhPN53EkbE,148
|
|
2
|
+
llama_index/llms/openai/base.py,sha256=3_D2p15hJZwjAlA_fGBWqD7gPG1TcsaS65pEGhNRP5s,37096
|
|
3
|
+
llama_index/llms/openai/utils.py,sha256=MM8xilN70w4jFXsf-aoE4HdYWD3zptLEYjpeBZ02lEc,13571
|
|
4
|
+
llama_index_llms_openai-0.2.6.dist-info/METADATA,sha256=UnLmtVdvZN6V-fummuKoUb1QBUEmSEZ36SAkHpCdWb4,705
|
|
5
|
+
llama_index_llms_openai-0.2.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
6
|
+
llama_index_llms_openai-0.2.6.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=5wlEeigvfvdrhlm-0EEXvwuJm2t1o6ZJ9Dl2ob8oNLk,36998
|
|
3
|
-
llama_index/llms/openai/utils.py,sha256=MM8xilN70w4jFXsf-aoE4HdYWD3zptLEYjpeBZ02lEc,13571
|
|
4
|
-
llama_index_llms_openai-0.2.4.dist-info/METADATA,sha256=_OiQkheD5dE-b24cKH-uehLz8hnEUwSTjXQgJYEcFBA,705
|
|
5
|
-
llama_index_llms_openai-0.2.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
6
|
-
llama_index_llms_openai-0.2.4.dist-info/RECORD,,
|
|
File without changes
|