Modify Feedback For Step
client.steps.feedback.create(stringstepID, FeedbackCreateParams { feedback, tags } body, RequestOptionsoptions?): Step { id, agent_id, completion_tokens, 21 more }
/v1/steps/{step_id}/feedback
Modify feedback for a given step.
Parameters
Returns
Modify Feedback For Step
import Letta from '@letta-ai/letta-client';
const client = new Letta({
apiKey: 'My API Key',
});
const step = await client.steps.feedback.create('step-123e4567-e89b-42d3-8456-426614174000');
console.log(step.id);
{
"id": "id",
"agent_id": "agent_id",
"completion_tokens": 0,
"completion_tokens_details": {
"foo": "bar"
},
"context_window_limit": 0,
"error_data": {
"foo": "bar"
},
"error_type": "error_type",
"feedback": "positive",
"messages": [
{
"id": "message-123e4567-e89b-12d3-a456-426614174000",
"role": "assistant",
"agent_id": "agent_id",
"approval_request_id": "approval_request_id",
"approvals": [
{
"approve": true,
"tool_call_id": "tool_call_id",
"reason": "reason",
"type": "approval"
}
],
"approve": true,
"batch_item_id": "batch_item_id",
"content": [
{
"text": "text",
"signature": "signature",
"type": "text"
}
],
"created_at": "2019-12-27T18:11:19.117Z",
"created_by_id": "created_by_id",
"denial_reason": "denial_reason",
"group_id": "group_id",
"is_err": true,
"last_updated_by_id": "last_updated_by_id",
"model": "model",
"name": "name",
"otid": "otid",
"run_id": "run_id",
"sender_id": "sender_id",
"step_id": "step_id",
"tool_call_id": "tool_call_id",
"tool_calls": [
{
"id": "id",
"function": {
"arguments": "arguments",
"name": "name"
},
"type": "function"
}
],
"tool_returns": [
{
"status": "success",
"func_response": "func_response",
"stderr": [
"string"
],
"stdout": [
"string"
],
"tool_call_id": {}
}
],
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"model": "model",
"model_endpoint": "model_endpoint",
"origin": "origin",
"project_id": "project_id",
"prompt_tokens": 0,
"provider_category": "provider_category",
"provider_id": "provider_id",
"provider_name": "provider_name",
"run_id": "run_id",
"status": "pending",
"stop_reason": "end_turn",
"tags": [
"string"
],
"tid": "tid",
"total_tokens": 0,
"trace_id": "trace_id"
}Returns Examples
{
"id": "id",
"agent_id": "agent_id",
"completion_tokens": 0,
"completion_tokens_details": {
"foo": "bar"
},
"context_window_limit": 0,
"error_data": {
"foo": "bar"
},
"error_type": "error_type",
"feedback": "positive",
"messages": [
{
"id": "message-123e4567-e89b-12d3-a456-426614174000",
"role": "assistant",
"agent_id": "agent_id",
"approval_request_id": "approval_request_id",
"approvals": [
{
"approve": true,
"tool_call_id": "tool_call_id",
"reason": "reason",
"type": "approval"
}
],
"approve": true,
"batch_item_id": "batch_item_id",
"content": [
{
"text": "text",
"signature": "signature",
"type": "text"
}
],
"created_at": "2019-12-27T18:11:19.117Z",
"created_by_id": "created_by_id",
"denial_reason": "denial_reason",
"group_id": "group_id",
"is_err": true,
"last_updated_by_id": "last_updated_by_id",
"model": "model",
"name": "name",
"otid": "otid",
"run_id": "run_id",
"sender_id": "sender_id",
"step_id": "step_id",
"tool_call_id": "tool_call_id",
"tool_calls": [
{
"id": "id",
"function": {
"arguments": "arguments",
"name": "name"
},
"type": "function"
}
],
"tool_returns": [
{
"status": "success",
"func_response": "func_response",
"stderr": [
"string"
],
"stdout": [
"string"
],
"tool_call_id": {}
}
],
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"model": "model",
"model_endpoint": "model_endpoint",
"origin": "origin",
"project_id": "project_id",
"prompt_tokens": 0,
"provider_category": "provider_category",
"provider_id": "provider_id",
"provider_name": "provider_name",
"run_id": "run_id",
"status": "pending",
"stop_reason": "end_turn",
"tags": [
"string"
],
"tid": "tid",
"total_tokens": 0,
"trace_id": "trace_id"
}