🤖 Assistants V2 Support: Part 2

🎹 fix: Autocompletion Chrome Bug on Action API Key Input

chore: remove `useOriginNavigate`

chore: set correct OpenAI Storage Source

fix: azure file deletions, instantiate clients by source for deletion

update code interpret files info

feat: deleteResourceFileId

chore: increase poll interval as azure easily rate limits

fix: openai file deletions, TODO: evaluate rejected deletion settled promises to determine which to delete from db records

file source icons

update table file filters

chore: file search info and versioning

fix: retrieval update with necessary tool_resources if specified

fix(useMentions): add optional chaining in case listMap value is undefined

fix: force assistant avatar roundedness

fix: azure assistants, check correct flag

chore: bump data-provider
This commit is contained in:
Danny Avila 2024-05-18 08:01:02 -04:00
parent 2bdbff5141
commit bc46ccdcad
No known key found for this signature in database
GPG key ID: 2DD9CC89B9B50364
44 changed files with 420 additions and 174 deletions

View file

@ -683,7 +683,7 @@ export enum Constants {
/** Key for the app's version. */
VERSION = 'v0.7.2',
/** Key for the Custom Config's version (librechat.yaml). */
CONFIG_VERSION = '1.1.0',
CONFIG_VERSION = '1.1.1',
/** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
NO_PARENT = '00000000-0000-0000-0000-000000000000',
/** Fixed, encoded domain length for Azure OpenAI Assistants Function name parsing. */

View file

@ -334,9 +334,10 @@ export const getFileDownload = async (userId: string, file_id: string): Promise<
export const deleteFiles = async (
files: f.BatchFile[],
assistant_id?: string,
tool_resource?: a.EToolResources,
): Promise<f.DeleteFilesResponse> =>
request.deleteWithOptions(endpoints.files(), {
data: { files, assistant_id },
data: { files, assistant_id, tool_resource },
});
/* actions */

View file

@ -16,6 +16,11 @@ export enum Tools {
function = 'function',
}
export enum EToolResources {
code_interpreter = 'code_interpreter',
file_search = 'file_search',
}
export type Tool = {
[type: string]: Tools;
};
@ -94,6 +99,7 @@ export type AssistantUpdateParams = {
metadata?: Metadata | null;
name?: string | null;
tools?: Array<FunctionTool | string>;
tool_resources?: ToolResources;
endpoint: AssistantsEndpoint;
};

View file

@ -1,3 +1,5 @@
import { EToolResources } from './assistants';
export enum FileSources {
local = 'local',
firebase = 'firebase',
@ -7,6 +9,9 @@ export enum FileSources {
vectordb = 'vectordb',
}
export const checkOpenAIStorage = (source: string) =>
source === FileSources.openai || source === FileSources.azure;
export enum FileContext {
avatar = 'avatar',
unknown = 'unknown',
@ -55,6 +60,7 @@ export type TFile = {
usage: number;
context?: FileContext;
source?: FileSources;
filterSource?: FileSources;
width?: number;
height?: number;
expiresAt?: string | Date;
@ -98,6 +104,7 @@ export type BatchFile = {
export type DeleteFilesBody = {
files: BatchFile[];
assistant_id?: string;
tool_resource?: EToolResources;
};
export type DeleteMutationOptions = {