Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
d1196162
Commit
d1196162
authored
Aug 01, 2024
by
Aryan Kothari
Browse files
add: use skip and limit in api call
parent
519375b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/lib/apis/chats/index.ts
src/lib/apis/chats/index.ts
+2
-2
No files found.
src/lib/apis/chats/index.ts
View file @
d1196162
...
...
@@ -32,10 +32,10 @@ export const createNewChat = async (token: string, chat: object) => {
return
res
;
};
export
const
getChatList
=
async
(
token
:
string
=
''
)
=>
{
export
const
getChatList
=
async
(
token
:
string
=
''
,
skip
:
number
=
0
,
limit
:
number
=
-
1
)
=>
{
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
'
,
headers
:
{
Accept
:
'
application/json
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment