feedbacks
Classes
FeedbackModel
Bases: BaseModel
Represents a feedback entry in the database.
- Code Reference routers evaluations Classes EvaluationsClient Functions
Attributes
data
Content of the feedback, structure depends on 'type'.
Dict Fields
model_id(str, optional): ID of the model being ratedrating(str|int, optional): The rating value (e.g., 1, 0, -1 for win/draw/lose)sibling_model_ids(list[str], optional): IDs of sibling models in comparison scenarios (e.g., arena)tags(list[str], optional): Tags associated with the feedbackreason(str, optional): Reason for the ratingcomment(str, optional): Additional comment provided by the user
meta
Metadata associated with the feedback.
Dict Fields
arena(bool, optional): Whether the feedback is related to the arena featurechat_id(str, optional): ID of the chat session where feedback was givenmessage_id(str, optional): ID of the message being rated or commented ontags(list[str], optional): Tags associated with the feedbackmodel_id(str, optional): ID of the model being ratedmessage_index(int, optional): Index of the message in the chat historybase_models(dict[str, str], optional): Mapping of model IDs to their base model IDs
snapshot
Snapshot of the context (e.g., chat history) when feedback was given.
Dict Fields
chat(dict, optional): Complete chat object containing the conversation statechat.chat(dict, optional): Nested chat data structurechat.chat.history(dict, optional): Chat history informationchat.chat.history.messages(dict[str, object], optional): Message history mapping message IDs to message objectschat.chat.history.messages[*].parentId(str, optional): ID of parent messagechat.chat.history.messages[*].childrenIds(list[str], optional): List of child message IDschat.chat.history.messages[*].content(str, optional): Message content textchat.chat.history.messages[*].role(str, optional): Message role (e.g., 'user', 'assistant')chat.chat.history.messages[*].model(str, optional): Model used for the messagechat.chat.history.messages[*].done(bool, optional): Whether message processing is complete
FeedbackResponse
Bases: BaseModel
Response model for feedback items.
- Code Reference routers evaluations Classes EvaluationsClient Functions get_all_feedbacks
- Code Reference models feedbacks Classes FeedbackUserResponse
Attributes
data
Content of the feedback, structure depends on 'type'.
Dict Fields
model_id(str, optional): ID of the model being ratedrating(str|int, optional): The rating value (e.g., 1, 0, -1 for win/draw/lose)sibling_model_ids(list[str], optional): IDs of sibling models in comparison scenarios (e.g., arena)tags(list[str], optional): Tags associated with the feedbackreason(str, optional): Reason for the ratingcomment(str, optional): Additional comment provided by the user
meta
Metadata associated with the feedback.
Dict Fields
arena(bool, optional): Whether the feedback is related to the arena featurechat_id(str, optional): ID of the chat session where feedback was givenmessage_id(str, optional): ID of the message being rated or commented ontags(list[str], optional): Tags associated with the feedbackmodel_id(str, optional): ID of the model being ratedmessage_index(int, optional): Index of the message in the chat historybase_models(dict[str, str], optional): Mapping of model IDs to their base model IDs
snapshot
Snapshot of the context (e.g., chat history) when feedback was given.
Dict Fields
chat(dict, optional): Complete chat object containing the conversation statechat.chat(dict, optional): Nested chat data structurechat.chat.history(dict, optional): Chat history informationchat.chat.history.messages(dict[str, object], optional): Message history mapping message IDs to message objectschat.chat.history.messages[*].parentId(str, optional): ID of parent messagechat.chat.history.messages[*].childrenIds(list[str], optional): List of child message IDschat.chat.history.messages[*].content(str, optional): Message content textchat.chat.history.messages[*].role(str, optional): Message role (e.g., 'user', 'assistant')chat.chat.history.messages[*].model(str, optional): Model used for the messagechat.chat.history.messages[*].done(bool, optional): Whether message processing is complete
RatingData
Bases: BaseModel
Data structure for rating-type feedback.
- Code Reference models feedbacks Classes FeedbackForm Attributes data
Attributes
sibling_model_ids
IDs of sibling models in comparison scenarios (e.g., arena).
MetaData
Bases: BaseModel
Metadata for feedback entries.
Attributes
SnapshotData
Bases: BaseModel
Snapshot data capturing context at the time of feedback.
- Code Reference models feedbacks Classes FeedbackForm Attributes snapshot
Attributes
chat
The state of the chat when feedback was submitted.
Dict Fields
chat(dict, optional): Nested chat data structurechat.chat(dict, optional): Chat data structurechat.chat.history(dict, optional): Chat history informationchat.chat.history.messages(dict[str, object], optional): Message history mapping message IDs to message objectschat.chat.history.messages[*].parentId(str, optional): ID of parent messagechat.chat.history.messages[*].childrenIds(list[str], optional): List of child message IDschat.chat.history.messages[*].content(str, optional): Message content textchat.chat.history.messages[*].role(str, optional): Message role (e.g., 'user', 'assistant')chat.chat.history.messages[*].model(str, optional): Model used for the messagechat.chat.history.messages[*].done(bool, optional): Whether message processing is complete
FeedbackForm
Bases: BaseModel
Form for creating or updating feedback.
- Code Reference routers evaluations Classes EvaluationsClient Functions
Attributes
meta
Metadata associated with the feedback.
Dict Fields
arena(bool, optional): Whether the feedback is related to the arena featurechat_id(str, optional): ID of the chat session where feedback was givenmessage_id(str, optional): ID of the message being rated or commented ontags(list[str], optional): Tags associated with the feedbackmodel_id(str, optional): ID of the model being ratedmessage_index(int, optional): Index of the message in the chat historybase_models(dict[str, str], optional): Mapping of model IDs to their base model IDs
UserResponse
Bases: BaseModel
User details associated with feedback.
- Code Reference models feedbacks Classes FeedbackUserResponse Attributes user
Attributes
FeedbackUserResponse
Bases: FeedbackResponse
Feedback response including user details.
- Code Reference
Attributes
FeedbackListResponse
Bases: BaseModel
Response model for a list of feedbacks with pagination.
- Code Reference routers evaluations Classes EvaluationsClient Functions get_feedbacks_list