Skip to content

Parallel tool call and client error #286

Description

@stefanolissa

Hi,
Using the Mistral AI Provider by @saarnilauri and providing the prompt builder with a set of abilities, the Mistral model can return multiple tool call requests in a single answer (if not disabled with a model custom config key).

Detecting the function call request using WP_AI_Client_Ability_Function_Resolver, I execute the requested abilities with the class method execute_abilities getting back a Message. Everything fine.

When I try to send that message to the model, the operation is blocked by the AI Client with the error "The API only allows a single function response, as the only content of the message" from the AbstractOpenAiCompatibleTextGenerationModel::getMessagePartContentData().

Looking at the whole process, the method prepareMessagesParam() of the same class seems to process only a single function response within a message.

I don't know if it's something that should be extended or if it's a required behavior.

Thank you, Stefano.
PS: with WP 7.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions