(fix) 'utf-8' codec can't encode characters error on OpenAI (#7018)

* test_openai_multilingual

* pin httpx

* fix openai pyproject

* test_multilingual_requests

* TestOpenAIChatCompletion

* fix test anthropic completion
This commit is contained in:
Ishaan Jaff 2024-12-03 20:33:14 -08:00 committed by GitHub
parent beef64354e
commit 2a8d64991f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 39 additions and 5 deletions

View file

@ -15,6 +15,7 @@ from respx import MockRouter
import litellm
from litellm import Choices, Message, ModelResponse
from base_llm_unit_tests import BaseLLMChatTest
def test_openai_prediction_param():
@ -268,3 +269,12 @@ async def test_vision_with_custom_model():
]
assert request_body["model"] == "my-custom-model"
assert request_body["max_tokens"] == 10
class TestOpenAIChatCompletion(BaseLLMChatTest):
def get_base_completion_call_args(self) -> dict:
return {"model": "gpt-4o-mini"}
def test_tool_call_no_arguments(self, tool_call_no_arguments):
"""Test that tool calls with no arguments is translated correctly. Relevant issue: https://github.com/BerriAI/litellm/issues/6833"""
pass