refac
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { WEBUI_API_BASE_URL } from '$lib/constants';
|
||||
import { getTimeRange } from '$lib/utils';
|
||||
|
||||
export const createNewChat = async (token: string, chat: object) => {
|
||||
export const createNewChat = async (token: string, chat: object, folderId: string | null) => {
|
||||
let error = null;
|
||||
|
||||
const res = await fetch(`${WEBUI_API_BASE_URL}/chats/new`, {
|
||||
@@ -12,7 +12,8 @@ export const createNewChat = async (token: string, chat: object) => {
|
||||
authorization: `Bearer ${token}`
|
||||
},
|
||||
body: JSON.stringify({
|
||||
chat: chat
|
||||
chat: chat,
|
||||
folder_id: folderId ?? null
|
||||
})
|
||||
})
|
||||
.then(async (res) => {
|
||||
|
||||
Reference in New Issue
Block a user