mirror of
https://github.com/open-webui/open-webui
synced 2025-04-24 16:32:11 +00:00
add: use skip and limit in api call
This commit is contained in:
parent
519375b4c0
commit
d11961626c
@ -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',
|
||||||
|
Loading…
Reference in New Issue
Block a user