What causes MUTUALLY_EXCLUSIVE_ARGUMENTS error in ...
# ask-stanley-ai
a
What causes MUTUALLY_EXCLUSIVE_ARGUMENTS error in llm.generateText? It only started happening when I added responseFormat parameter. Here's what the function call looks like now: llm.generateText({ preamble: "You are an information extraction engine for creating NetSuite Purchase Requisition records from Quote PDFs creating by various vendors. The prompts will always contain the text extracted from Quote PDFs, but the layouts will vary with each vendor. Answer as normalized JSON with a consistent structural schema that can be used to programmatically set field values and sublist line field values on a Purchase Requisition in NetSuite. Do not guess, infer, or generate any missing keys or values, except to use the provided historical 'itemProfiles' data to infer which item ID is most likely the right one to use for the 'id' and 'description' members of each purchaserequest.items[n] array entry; only parse and use what is in the prompt, and only include in your answer what would conform to the provided responseFormat. The script that uses your answer will take care of the rest.", prompt: docText, documents: [ {id: "itemProfiles", data: itemProfilesJSON} ], responseFormat: outputSchema, modelParameters: { presencePenalty: 0, frequencyPenalty: 0, temperature: 0 //lower temperatures are higher predictability and precision, higher temperatures are for more variability and creative responses. For Cohere Command A (cohere.command-a-03-2025), the value range is between 0 and 1 with a default of 0.2 }, timeout: 60000, //defaults to 30,000ms });
c
AI generated answer (using internal Slack threads):
The
MUTUALLY_EXCLUSIVE_ARGUMENTS
error in
llm.generateText
is likely caused by the simultaneous use of parameters that are not supposed to be used together. In your case, it seems like the
responseFormat
parameter is causing the issue. The
responseFormat
parameter is used to specify the format of the response. However, if you're using other parameters that inherently determine the format of the response, using
responseFormat
at the same time can cause a conflict, hence the
MUTUALLY_EXCLUSIVE_ARGUMENTS
error. To resolve this issue, you may need to remove the
responseFormat
parameter from your function call, or adjust other parameters so they don't conflict with
responseFormat
. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.82031256
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813537598
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811462462
Please provide your feedback on this answer.
Thank you for your feedback