[Model] Remove duplicated message check in Mistral chat completion request (#15069)

Signed-off-by: Brayden Zhong <b8zhong@uwaterloo.ca>
This commit is contained in:
Brayden Zhong 2025-03-19 01:09:32 -04:00 committed by GitHub
parent 437f9162d0
commit 8b3e94a357
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -143,10 +143,6 @@ def make_mistral_chat_completion_request(
if last_message["role"] == "assistant":
last_message["prefix"] = True
last_message = cast(Dict[str, Any], messages[-1])
if last_message["role"] == "assistant":
last_message["prefix"] = True
# mistral-common requires AssistantMessage content to be string [1].
#
# [1]: https://github.com/mistralai/mistral-common/blob/f4a06998b75ed78bbf5aaf569590b772ea26c9f6/src/mistral_common/protocol/instruct/messages.py#L80