Unverified Commit 8b3e94a3 authored by Brayden Zhong's avatar Brayden Zhong Committed by GitHub
Browse files

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


Signed-off-by: default avatarBrayden Zhong <b8zhong@uwaterloo.ca>
parent 437f9162
...@@ -143,10 +143,6 @@ def make_mistral_chat_completion_request( ...@@ -143,10 +143,6 @@ def make_mistral_chat_completion_request(
if last_message["role"] == "assistant": if last_message["role"] == "assistant":
last_message["prefix"] = True 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]. # 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 # [1]: https://github.com/mistralai/mistral-common/blob/f4a06998b75ed78bbf5aaf569590b772ea26c9f6/src/mistral_common/protocol/instruct/messages.py#L80
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment