i build an assitant and i comunicate with him with the api.
i add messages and run thread and get response, after i use tool,i want to submit the tool and i try to submit tool output
The newRun.RequiredAction.SubmitToolOutputs.ToolCalls[0].Id is correct
my code
var toolOutputResponse = await PostAsJsonAsync($"v1/threads/{threadId}/runs/{newRun.Id}/submit_tool_outputs",
new ToolsOutput(newRun.RequiredAction.SubmitToolOutputs.ToolCalls[0].Id,"{\"Success\":\"true\"}"));
public class ToolsOutput
{
[JsonProperty("tool_call_id")]
public string ToolCallId { get; set; }
[JsonProperty("output")]
public string Output { get; set; }
public ToolsOutput(string toolCallId, string output)
{
ToolCallId = toolCallId;
Output = output;
}
}
i always get 400 error - can’t find whats wrong
how can i debug it?