Hello,
Just reporting a bug with the UI here that impacts the messages leveraged by tools. Here is a summary of the issue along with steps to reproduce:
1. Create a tool with custom messages. Leverage the "system" role with the "request-complete" status to instruct the LLM to generate a message based on the instructions provided. Example included below for a tool used to fetch availability (Step 1. Example).
2. (Optional) Test the tool with an assistant. The assistant will successfully generate a message based on the instructions provided in the content. Alternatively, just verify that the role is set to "system" when you fetch the tool from the API
3. Navigate to the tool's management page in the UI.
4. Update any part of the tool in the UI and save (e.g., update the description). Even if the messages section was not updated, any custom message with a "system" role will have been overwritten to an "assistant" role. This causes very awkward behavior in production until caught because the assistant recounts the "system" prompt rather than generating a message from it.
Step 1. Example:
"messages": [
{
"type": "request-start",
"content": "Let's see what openings we have in the system."
},
{
"type": "request-response-delayed",
"content": "Hmmm... I'm still looking around for something."
},
{
"role": "system",
"type": "request-complete",
"content": "You've fetched appointment availability. First ask if the date and time from option 1 works. Example: 'It looks like we have an opening on
at
. Does that work for you?
'"
},
{
"type": "request-failed",
"content": "I'm really sorry but I'm having trouble accessing our system."
}
],