% curl --request POST \
--url http://localhost:8283/v1/agents/agent-95e54e09-f18b-4bf8-b795-50d86130456e/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "user",
"text": "hi again"
}
]
}'
{
"messages":[
{"id":"message-ebb31345-bc00-4480-8a5f-b4d6cf875ec8","date":"2024-10-31T23:23:01+00:00","message_type":"internal_monologue","internal_monologue":"The user just sent another greeting. Replying with a question to facilitate the conversation."},
{"id":"message-ebb31345-bc00-4480-8a5f-b4d6cf875ec8","date":"2024-10-31T23:23:01+00:00","message_type":"function_call","function_call":{"name":"send_message","arguments":"{\n \"message\": \"Hi! Anything fun you want to talk about?\"\n}","function_call_id":"call_P4JH1VdVUpP30YIqKFIH8s4S"}},
{"id":"message-e4456e9d-61ca-4ce0-a878-4a822fc0917c","date":"2024-10-31T23:23:01+00:00","message_type":"function_return","function_return":"None","status":"success","function_call_id":"call_P4JH1VdVUpP30YIqKFIH8s4S"}
],
"usage":{"completion_tokens":48,"prompt_tokens":3251,"total_tokens":3299,"step_count":1}
}
After (with use_assistant_message == true):
% curl --request POST \
--url http://localhost:8283/v1/agents/agent-95e54e09-f18b-4bf8-b795-50d86130456e/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "user",
"text": "hi again"
}
],
"use_assistant_message": true
}'
{
"messages":[
{"id":"message-5b3f8da3-2329-4945-b7e0-ca76cfa375a4","date":"2024-10-31T23:30:49+00:00","message_type":"internal_monologue","internal_monologue":"The user greeted me again. Responding with a friendly question to engage them in the conversation."},
{"id":"message-5b3f8da3-2329-4945-b7e0-ca76cfa375a4","date":"2024-10-31T23:30:49+00:00","message_type":"assistant_message","assistant_message":"Hello! What brings you here today?"},
{"id":"message-bfb392c4-bfc6-4a28-86cc-17125b1d3114","date":"2024-10-31T23:30:49+00:00","message_type":"function_return","function_return":"None","status":"success","function_call_id":"call_j4MWxybVBc7CICOg9lYqmscj"}
],
"usage":{"completion_tokens":48,"prompt_tokens":3391,"total_tokens":3439,"step_count":1}
}
Before:
After:
After (with
use_assistant_message == true
):