mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-08 11:38:51 +01:00
feat: add preset and edit preset.
This commit is contained in:
parent
80ef5008dd
commit
45e17da241
29 changed files with 592 additions and 493 deletions
|
|
@ -3,14 +3,19 @@ import axios from 'axios';
|
|||
import useSWR from 'swr';
|
||||
import useSWRMutation from 'swr/mutation';
|
||||
|
||||
const fetcher = (url) => fetch(url, { credentials: 'include' }).then((res) => res.json());
|
||||
const fetcher = url => fetch(url, { credentials: 'include' }).then(res => res.json());
|
||||
const axiosFetcher = async (url, params) => {
|
||||
console.log(params, 'params');
|
||||
return axios.get(url, params);
|
||||
};
|
||||
|
||||
const postRequest = async (url, { arg }) => {
|
||||
return await axios.post(url, { withCredentials: true, arg });
|
||||
export const postRequest = async (url, { arg }) => {
|
||||
return await axios({
|
||||
method: 'post',
|
||||
url: url,
|
||||
withCredentials: true,
|
||||
data: { arg }
|
||||
});
|
||||
};
|
||||
|
||||
export const searchFetcher = async (pre, q, pageNumber, callback) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue