mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
(fix) OpenAI's optional messages[].name does not work with Mistral API (#6701)
* use helper for _transform_messages mistral * add test_message_with_name to base LLMChat test * fix linting
This commit is contained in:
parent
dab786f65f
commit
2009f4d28e
4 changed files with 100 additions and 38 deletions
|
@ -45,6 +45,14 @@ class BaseLLMChatTest(ABC):
|
|||
)
|
||||
assert response is not None
|
||||
|
||||
def test_message_with_name(self):
|
||||
base_completion_call_args = self.get_base_completion_call_args()
|
||||
messages = [
|
||||
{"role": "user", "content": "Hello", "name": "test_name"},
|
||||
]
|
||||
response = litellm.completion(**base_completion_call_args, messages=messages)
|
||||
assert response is not None
|
||||
|
||||
@pytest.fixture
|
||||
def pdf_messages(self):
|
||||
import base64
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue