In Conversational Agents Preview, I'm trying to get a playbook to use an API endpoint that returns a raw JSON object with basic job profile information for green jobs. I've added a few shot examples of calling the tool, and then formatting the JSON data into a conversational response.
One example I've given in the playbook set up has this JSON input from the API call
The agent successfully calls the API tool and does this for a range of valid job titles (not just the ones in my examples). I can see it gets the JSON response in the test agent simulator.
But it fails to give any formatted response back to the user.
Has anyone got this working successfully with a playbook in the Conversational Agents preview?
Sorry my example didn't seem to be included in my original post.
The API responds to the agent with JSON like this:
{
"title": "Retrofit Coordinator",
"description": "Responsible for overseeing building retrofit projects.",
"salaries": {
"currency": "GBP",
"entry_level": {"min": 25000, "max": 35000},
"early_career": {"min": 35000, "max": 45000},
"experienced": {"min": 45000, "max": 60000}
},
"training": [
{
"title": "Retrofit Fundamentals",
"external_url": "https://example.com/retrofit-fundamentals",
"training_type": "Online Course",
"min_age": 18
}
]
}
And in the examples I tell the agent to format the chat response like this:
The Retrofit Coordinator role is responsible for overseeing building retrofit projects. At entry level, the salary ranges from £25,000 to £35,000; early career professionals can expect between £35,000 and £45,000, while experienced coordinators earn between £45,000 and £60,000. Training is available through courses such as "Retrofit Fundamentals."
I'm also facing this issue, got response from API not respond back to the user
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |