-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Description:
When using the web_search method with the minimax model, the return data format is inconsistent compared to the standard method. This inconsistency causes an error in the MiniMaxChatModel class’s call method, as it does not handle the web_search specific return format properly.
Steps to Reproduce:
1.Use the minimax model with the web_search method.
2.Observe the returned data format.
3.Compare it with the data format returned by the standard method (without web_search).
Expected Behavior:
•The data returned should have a consistent format regardless of whether web_search is used or not.
Actual Behavior:
•When using the standard method, the response is contained in choice.message.
•When using web_search, the response is contained in choice.messages.
•The MiniMaxChatModel class’s call method does not handle the web_search return format correctly, leading to an error.
Example response format with standard method:
{ "choice": { "message": "..." } }
Example response format with web_search:
{ "choice": { "messages": ["..."] } }

Additional Context:
To fix this issue, the MiniMaxChatModel class’s call method should be updated to handle the web_search specific return format properly. The method should check for the existence of choice.messages and handle it accordingly.