Cant set analysisPlan messages via API
# support
a
So when I try provide prompts to the analysisPlan. I cannot set those values by the API. Both in my code, but also in Fern client that comes with the docs. In the docs it says do something like this: "analysisPlan": { "summaryPlan": { "messages": [ { "role": "system", "content": "Summarize this call in 3 words" } ], But this will never be stored. Additionally the response from the Get Assistant, shows that there is an undocumented value called summaryPrompt. Providing this argument, actually populates the Summary. https://cdn.discordapp.com/attachments/1307340218676019322/1307340219292455053/image.png?ex=6739f2f5&is=6738a175&hm=56ebee961a8971f1858ec4617f1cacb771bc04831bfb596ec890fe5faf7ee07c&
v
@Amanski It seems like there might be a discrepancy in the documentation regarding how to set the
summaryPrompt
for the
analysisPlan
. The correct way to set the summary prompt is by using the
summaryPrompt
attribute within the
analysisPlan
object, not the
messages
array as shown in the example you provided. To update the
summaryPrompt
, you should structure your API request to include the
summaryPrompt
field directly within the
analysisPlan
object, like this:
Copy code
json
"analysisPlan": {
  "summaryPrompt": "Summarize this call in 3 words"
}
This should correctly set the prompt that's used to summarize the call. If you're still experiencing issues with setting the
summaryPrompt
through your code or the Fern client, it might be a good idea to reach out to the support team for further assistance. They can provide more detailed guidance and help resolve any potential bugs or documentation errors. If you need to contact support or have any other questions, please let me know, and I'll be happy to assist you further.
You can continue this conversation by mentioning me in the message.
s
Hey @Amanski these prompts such as SummaryPrompt are deprecated now in favuour of analysisPlan. AnalysisPlan has circular references whcih swagger doesn't allows because of it you don't see an editor in the docs for circular reference of the JSON Schema, but you can do the same using Any API tools such as Postman.
If you don't mind can you help me with the issue your facing using JSON schema using your code for AnalysisPlan.
Copy code
To help track down this issue, could you share it as:
- What response you expected to get
- What response you actually got instead
This would really help me figure out what went wrong!
a
Sure. Basically if I use analysisPlan either in my code or in the client that is provided with the docs. Then, the value is simply not set.
I mean, if I use analysisPlan as documented. But when I for example set analysisPlan.summaryPrompt, then it is populated.
s
can you help me with code snippet (JSON Schema) how your doing it and what's the response of createAssistant or createCall, blocking you to use it.
s
This looks good to me can you share the respsonse or error message your getting back from Vapi?
a
No error, it just doesnt do anything. But using summaryPrompt does.
s
Hey @Amanski can you explain me more about just doesn't do anything?
a
Meaning it doesnt populate the assistant.
But using summaryPrompt does.
Also ensure of how to make the structuredDataPlan work. I can really fill the "structuredDataPlan.schema.properties" input with object.
s
Okay @Amanski doubt's cleared to save back and forth can you share themost recent call id?
2 Views