mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 18:30:15 +01:00
🤖 fix: Minor Assistants Issues (#4436)
* refactor(OpenAIClient): titleChatCompletion try/catch * fix: remove duplicate concatenation as seems to be handled by client SDK now * fix: assistants image upload * chore: imports order
This commit is contained in:
parent
65888c274a
commit
b85c6206ab
3 changed files with 26 additions and 16 deletions
|
|
@ -1,6 +1,12 @@
|
|||
import { EToolResources } from 'librechat-data-provider';
|
||||
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
||||
import { dataService, MutationKeys, QueryKeys, defaultOrderQuery } from 'librechat-data-provider';
|
||||
import {
|
||||
QueryKeys,
|
||||
dataService,
|
||||
MutationKeys,
|
||||
defaultOrderQuery,
|
||||
isAssistantsEndpoint,
|
||||
} from 'librechat-data-provider';
|
||||
import type * as t from 'librechat-data-provider';
|
||||
import type { UseMutationResult } from '@tanstack/react-query';
|
||||
|
||||
|
|
@ -27,8 +33,12 @@ export const useUploadFileMutation = (
|
|||
const width = body.get('width') ?? '';
|
||||
const height = body.get('height') ?? '';
|
||||
const version = body.get('version') ?? '';
|
||||
const endpoint = (body.get('endpoint') ?? '') as string;
|
||||
if (isAssistantsEndpoint(endpoint) && version === '2') {
|
||||
return dataService.uploadFile(body, signal);
|
||||
}
|
||||
|
||||
if (width !== '' && height !== '' && (version !== '' || version.toString() !== '2')) {
|
||||
if (width !== '' && height !== '') {
|
||||
return dataService.uploadImage(body, signal);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue