mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-12 15:27:06 +00:00
doc: warning added for deprectaion of gpt-3.5 as default model for OpenAI generators (#8300)
* warning added for gpt3.5 usage * Revert "warning added for gpt3.5 usage" This reverts commit 035a0ab9eaa9306171439fe128a78b7898ffe486. * update openaigenerator and openaichatgenerator with warnings * if cond removed * update description * adding release notes * linting --------- Co-authored-by: David S. Batista <dsbatista@gmail.com>
This commit is contained in:
parent
51180e060e
commit
7dbc51a3e7
@ -5,6 +5,7 @@
|
||||
import copy
|
||||
import json
|
||||
import os
|
||||
import warnings
|
||||
from typing import Any, Callable, Dict, List, Optional, Union
|
||||
|
||||
from openai import OpenAI, Stream
|
||||
@ -117,6 +118,11 @@ class OpenAIChatGenerator:
|
||||
Maximum number of retries to contact OpenAI after an internal error.
|
||||
If not set, it defaults to either the `OPENAI_MAX_RETRIES` environment variable, or set to 5.
|
||||
"""
|
||||
warnings.warn(
|
||||
"In the upcoming releases 'gpt-3.5-turbo' will be replaced by 'gpt-4o-mini' as the default model",
|
||||
DeprecationWarning,
|
||||
)
|
||||
|
||||
self.api_key = api_key
|
||||
self.model = model
|
||||
self.generation_kwargs = generation_kwargs or {}
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import os
|
||||
import warnings
|
||||
from typing import Any, Callable, Dict, List, Optional, Union
|
||||
|
||||
from openai import OpenAI, Stream
|
||||
@ -102,6 +103,11 @@ class OpenAIGenerator:
|
||||
from the `OPENAI_MAX_RETRIES` environment variable or set to 5.
|
||||
|
||||
"""
|
||||
warnings.warn(
|
||||
"In the upcoming releases 'gpt-3.5-turbo' will be replaced by 'gpt-4o-mini' as the default model",
|
||||
DeprecationWarning,
|
||||
)
|
||||
|
||||
self.api_key = api_key
|
||||
self.model = model
|
||||
self.generation_kwargs = generation_kwargs or {}
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The 'gpt-3.5-turbo' as the default model for the `OpenAIGenerator` and `OpenAIChatGenerator` will be replaced by 'gpt-4o-mini'.
|
||||
Loading…
x
Reference in New Issue
Block a user