mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-06 10:38:50 +01:00
feat: count tokens for context
feat(BingAI): convert toneStyle to lowercase before setting it in state feat(BingAI): pass setToneStyle function to Settings component refactor(BingAI): remove unused import and change setOption to setToneStyle in Settings component refactor(fetchers.js): add axiosPost function for debounced axios post requests
This commit is contained in:
parent
cef98070e9
commit
1a196580b2
5 changed files with 56 additions and 43 deletions
|
|
@ -18,6 +18,15 @@ export const postRequest = async (url, { arg }) => {
|
|||
});
|
||||
};
|
||||
|
||||
export const axiosPost = async ({ url, arg, callback }) => {
|
||||
try {
|
||||
const response = await axios.post(url, { arg }, { withCredentials: true });
|
||||
callback(response.data);
|
||||
} catch (error) {
|
||||
console.error('An error occurred while making the axios post request:', error);
|
||||
}
|
||||
};
|
||||
|
||||
export const searchFetcher = async (pre, q, pageNumber, callback) => {
|
||||
pre();
|
||||
const { data } = await axios.get(`/api/search?q=${q}&pageNumber=${pageNumber}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue