mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
o1 - add image param handling (#7312)
* fix(openai.py): fix returning o1 non-streaming requests fixes issue where fake stream always true for o1 * build(model_prices_and_context_window.json): add 'supports_vision' for o1 models * fix: add internal server error exception mapping * fix(base_llm_unit_tests.py): drop temperature from test * test: mark prompt caching as a flaky test
This commit is contained in:
parent
a101c1fff4
commit
62b00cf28d
9 changed files with 68 additions and 79 deletions
|
@ -140,20 +140,6 @@ class BaseLLMChatTest(ABC):
|
|||
)
|
||||
assert response is not None
|
||||
|
||||
def test_multilingual_requests(self):
|
||||
"""
|
||||
Tests that the provider can handle multilingual requests and invalid utf-8 sequences
|
||||
|
||||
Context: https://github.com/openai/openai-python/issues/1921
|
||||
"""
|
||||
base_completion_call_args = self.get_base_completion_call_args()
|
||||
response = self.completion_function(
|
||||
**base_completion_call_args,
|
||||
messages=[{"role": "user", "content": "你好世界!\ud83e, ö"}],
|
||||
)
|
||||
print("multilingual response: ", response)
|
||||
assert response is not None
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"response_format",
|
||||
[
|
||||
|
@ -343,6 +329,7 @@ class BaseLLMChatTest(ABC):
|
|||
)
|
||||
assert response is not None
|
||||
|
||||
@pytest.mark.flaky(retries=4, delay=1)
|
||||
def test_prompt_caching(self):
|
||||
litellm.set_verbose = True
|
||||
from litellm.utils import supports_prompt_caching
|
||||
|
@ -399,7 +386,6 @@ class BaseLLMChatTest(ABC):
|
|||
],
|
||||
},
|
||||
],
|
||||
temperature=0.2,
|
||||
max_tokens=10,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue