evaluations
Classes
EvaluationsClient
EvaluationsClient(client: OWUIClientBase)
Bases: ResourceBase
Client for the Evaluations endpoints. Handles configuration of evaluation arena models and management of feedback.
- Code Reference client Classes OpenWebUI Attributes evaluations
Source code in src/owui_client/client_base.py
Functions
get_config
Get the current evaluation configuration.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: A dictionary containing evaluation settings, including: |
Dict[str, Any]
|
|
Dict[str, Any]
|
|
Source code in src/owui_client/routers/evaluations.py
update_config
update_config(
form_data: UpdateConfigForm,
) -> Dict[str, Any]
Update the evaluation configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
UpdateConfigForm
|
The configuration update form containing fields to update. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: The updated evaluation configuration. |
Source code in src/owui_client/routers/evaluations.py
get_all_feedbacks
get_all_feedbacks() -> List[FeedbackResponse]
Get all feedbacks (admin only).
Returns:
| Type | Description |
|---|---|
List[FeedbackResponse]
|
List[FeedbackResponse]: A list of all feedback entries in the system. |
Source code in src/owui_client/routers/evaluations.py
delete_all_feedbacks
Delete all feedbacks (admin only).
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the operation was successful. |
Source code in src/owui_client/routers/evaluations.py
export_all_feedbacks
export_all_feedbacks() -> List[FeedbackModel]
Export all feedbacks with full data details (admin only).
Returns:
| Type | Description |
|---|---|
List[FeedbackModel]
|
List[FeedbackModel]: A list of all feedback models with complete data for export. |
Source code in src/owui_client/routers/evaluations.py
get_feedbacks_by_user
get_feedbacks_by_user() -> List[FeedbackUserResponse]
Get feedbacks submitted by the current user.
Returns:
| Type | Description |
|---|---|
List[FeedbackUserResponse]
|
List[FeedbackUserResponse]: A list of feedbacks submitted by the user. |
Source code in src/owui_client/routers/evaluations.py
delete_feedbacks_by_user
Delete all feedbacks submitted by the current user.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the operation was successful. |
Source code in src/owui_client/routers/evaluations.py
get_feedbacks_list
get_feedbacks_list(
order_by: Optional[str] = None,
direction: Optional[str] = None,
page: Optional[int] = 1,
) -> FeedbackListResponse
Get a paginated and sorted list of feedbacks (admin only).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_by
|
Optional[str]
|
The field name to order the results by (e.g., 'created_at'). |
None
|
direction
|
Optional[str]
|
The sort direction, either 'asc' (ascending) or 'desc' (descending). |
None
|
page
|
Optional[int]
|
The page number to retrieve (default is 1). |
1
|
Returns:
| Type | Description |
|---|---|
FeedbackListResponse
|
|
Source code in src/owui_client/routers/evaluations.py
create_feedback
create_feedback(form_data: FeedbackForm) -> FeedbackModel
Create a new feedback entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
FeedbackForm
|
The data for the new feedback (e.g., type, content, data). |
required |
Returns:
| Type | Description |
|---|---|
FeedbackModel
|
|
Source code in src/owui_client/routers/evaluations.py
get_feedback
get_feedback(id: str) -> FeedbackModel
Get a specific feedback entry by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The unique identifier of the feedback to retrieve. |
required |
Returns:
| Type | Description |
|---|---|
FeedbackModel
|
|
Source code in src/owui_client/routers/evaluations.py
update_feedback
update_feedback(
id: str, form_data: FeedbackForm
) -> FeedbackModel
Update a specific feedback entry by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The unique identifier of the feedback to update. |
required |
form_data
|
FeedbackForm
|
The updated data for the feedback. |
required |
Returns:
| Type | Description |
|---|---|
FeedbackModel
|
|
Source code in src/owui_client/routers/evaluations.py
delete_feedback
Delete a specific feedback entry by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The unique identifier of the feedback to delete. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the operation was successful. |