diff --git a/backend/open_webui/routers/evaluations.py b/backend/open_webui/routers/evaluations.py index cce9d591ee..eb79bfa63c 100644 --- a/backend/open_webui/routers/evaluations.py +++ b/backend/open_webui/routers/evaluations.py @@ -10,7 +10,6 @@ from open_webui.models.feedbacks import ( FeedbackIdResponse, FeedbackListResponse, FeedbackModel, - FeedbackResponse, Feedbacks, FeedbackUserResponse, LeaderboardFeedbackData, @@ -295,12 +294,6 @@ async def get_feedback_model_ids(user=Depends(get_admin_user), db: AsyncSession return await Feedbacks.get_distinct_model_ids(db=db) -@router.get('/feedbacks/all', response_model=list[FeedbackResponse]) -async def get_all_feedbacks(user=Depends(get_admin_user), db: AsyncSession = Depends(get_async_session)): - feedbacks = await Feedbacks.get_all_feedbacks(db=db) - return feedbacks - - @router.get('/feedbacks/all/ids', response_model=list[FeedbackIdResponse]) async def get_all_feedback_ids(user=Depends(get_admin_user), db: AsyncSession = Depends(get_async_session)): return await Feedbacks.get_all_feedback_ids(db=db) diff --git a/src/lib/apis/evaluations/index.ts b/src/lib/apis/evaluations/index.ts index bfb6955bcf..3d00a61961 100644 --- a/src/lib/apis/evaluations/index.ts +++ b/src/lib/apis/evaluations/index.ts @@ -62,37 +62,6 @@ export const updateConfig = async (token: string, config: object) => { return res; }; -export const getAllFeedbacks = async (token: string = '') => { - let error = null; - - const res = await fetch(`${WEBUI_API_BASE_URL}/evaluations/feedbacks/all`, { - method: 'GET', - headers: { - Accept: 'application/json', - 'Content-Type': 'application/json', - authorization: `Bearer ${token}` - } - }) - .then(async (res) => { - if (!res.ok) throw await res.json(); - return res.json(); - }) - .then((json) => { - return json; - }) - .catch((err) => { - error = err.detail; - console.error(err); - return null; - }); - - if (error) { - throw error; - } - - return res; -}; - export const getLeaderboard = async (token: string = '', query: string = '') => { let error = null;