Provide Message Feedback
POST https://api.credal.ai/api/v0/copilots/provideMessageFeedback Content-Type: application/json
Reference: https://docs.credal.ai/api-reference/api-reference/copilots/provide-message-feedback
Authentication
Section titled “Authentication”Authorizationheader (bearer token, required) — Bearer authentication of the formBearer <token>, where token is your auth token.
Request
Section titled “Request”Body (application/json)
Section titled “Body (application/json)”This endpoint expects an object.
agentId(UUID, required) — Credal-generated Agent ID to specify which agent to route the request to.userEmail(string, required) — The user profile you want to use when providing feedback.messageId(UUID, required) — The message ID for which feedback is being provided.messageFeedback(MessageFeedback, required) — The feedback provided by the user.
MessageFeedback
Section titled “MessageFeedback”feedback(enum, required)- Allowed values:
POSITIVE,NEGATIVE
- Allowed values:
suggestedAnswer(string, optional)descriptiveFeedback(string, optional)
Examples
Section titled “Examples”Request
{
"agentId": "82e4b12a-6990-45d4-8ebd-85c00e030c24",
"userEmail": "ravin@credal.ai",
"messageId": "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
"messageFeedback": {
"feedback": "NEGATIVE",
"suggestedAnswer": "Yes, Credal is SOC 2 compliant.",
"descriptiveFeedback": "The response should be extremely clear and concise."
}
}SDK Code
import { CredalClient } from "@credal/sdk";
async function main() {
const client = new CredalClient({
apiKey: "YOUR_TOKEN_HERE",
});
await client.copilots.provideMessageFeedback({
agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
userEmail: "ravin@credal.ai",
messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
messageFeedback: {
feedback: "NEGATIVE",
suggestedAnswer: "Yes, Credal is SOC 2 compliant.",
descriptiveFeedback: "The response should be extremely clear and concise.",
},
});
}
main();
from credal import CredalV0
import uuid
from credal.copilots import MessageFeedback
client = CredalV0(
api_key="YOUR_TOKEN_HERE",
)
client.copilots.provide_message_feedback(
agent_id=uuid.UUID("82e4b12a-6990-45d4-8ebd-85c00e030c24"),
user_email="ravin@credal.ai",
message_id=uuid.UUID("dd721cd8-4bf2-4b94-9869-258df3dab9dc"),
message_feedback=MessageFeedback(
feedback="NEGATIVE",
suggested_answer="Yes, Credal is SOC 2 compliant.",
descriptive_feedback="The response should be extremely clear and concise.",
),
)