add: use skip and limit in api call

This commit is contained in:
Aryan Kothari 2024-08-01 15:15:49 -04:00
parent 519375b4c0
commit d11961626c

View File

@ -32,10 +32,10 @@ export const createNewChat = async (token: string, chat: object) => {
return res; return res;
}; };
export const getChatList = async (token: string = '') => { export const getChatList = async (token: string = '', skip: number = 0, limit: number = -1) => {
let error = null; let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/chats/`, { const res = await fetch(`${WEBUI_API_BASE_URL}/chats/?skip=${skip}&limit=${limit}`, {
method: 'GET', method: 'GET',
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',