mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-23 10:54:11 +01:00
🔧 fix: Improve Assistants File Citation & Download Handling (#2248)
* fix(processMessages): properly handle assistant file citations and add sources list * feat: improve file download UX by making any downloaded files accessible within the app post-download * refactor(processOpenAIImageOutput): correctly handle two different outputs for images since OpenAI generates a file in their storage, shares filepath for image rendering * refactor: create `addFileToCache` helper to use across frontend * refactor: add ImageFile parts to cache on processing content stream
This commit is contained in:
parent
bc2a628902
commit
6a6b2e79b0
11 changed files with 142 additions and 57 deletions
|
|
@ -8,6 +8,10 @@ async function _get<T>(url: string, options?: AxiosRequestConfig): Promise<T> {
|
|||
return response.data;
|
||||
}
|
||||
|
||||
async function _getResponse<T>(url: string, options?: AxiosRequestConfig): Promise<T> {
|
||||
return await axios.get(url, { ...options });
|
||||
}
|
||||
|
||||
async function _post(url: string, data?: any) {
|
||||
const response = await axios.post(url, JSON.stringify(data), {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
|
@ -114,6 +118,7 @@ axios.interceptors.response.use(
|
|||
|
||||
export default {
|
||||
get: _get,
|
||||
getResponse: _getResponse,
|
||||
post: _post,
|
||||
postMultiPart: _postMultiPart,
|
||||
put: _put,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue