mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-10 19:44:23 +01:00
Merge branch 'main' into feat/openid-custom-data
This commit is contained in:
commit
244b9f94dc
35 changed files with 610 additions and 344 deletions
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
import { z } from 'zod';
|
||||
import type { ZodError } from 'zod';
|
||||
import type { TModelsConfig } from './types';
|
||||
|
|
@ -43,9 +42,8 @@ export const fileSourceSchema = z.nativeEnum(FileSources);
|
|||
type SchemaShape<T> = T extends z.ZodObject<infer U> ? U : never;
|
||||
|
||||
// Helper type to determine the default value or undefined based on whether the field has a default
|
||||
type DefaultValue<T> = T extends z.ZodDefault<z.ZodTypeAny>
|
||||
? ReturnType<T['_def']['defaultValue']>
|
||||
: undefined;
|
||||
type DefaultValue<T> =
|
||||
T extends z.ZodDefault<z.ZodTypeAny> ? ReturnType<T['_def']['defaultValue']> : undefined;
|
||||
|
||||
// Extract default values or undefined from the schema shape
|
||||
type ExtractDefaults<T> = {
|
||||
|
|
@ -145,6 +143,7 @@ export enum AgentCapabilities {
|
|||
end_after_tools = 'end_after_tools',
|
||||
execute_code = 'execute_code',
|
||||
file_search = 'file_search',
|
||||
artifacts = 'artifacts',
|
||||
actions = 'actions',
|
||||
tools = 'tools',
|
||||
}
|
||||
|
|
@ -218,6 +217,7 @@ export const agentsEndpointSChema = baseEndpointSchema.merge(
|
|||
.default([
|
||||
AgentCapabilities.execute_code,
|
||||
AgentCapabilities.file_search,
|
||||
AgentCapabilities.artifacts,
|
||||
AgentCapabilities.actions,
|
||||
AgentCapabilities.tools,
|
||||
]),
|
||||
|
|
@ -1067,6 +1067,7 @@ export enum ImageDetailCost {
|
|||
/**
|
||||
* Additional Cost added to High Resolution Total Cost
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
||||
ADDITIONAL = 85,
|
||||
}
|
||||
|
||||
|
|
@ -1137,7 +1138,7 @@ export enum TTSProviders {
|
|||
/** Enum for app-wide constants */
|
||||
export enum Constants {
|
||||
/** Key for the app's version. */
|
||||
VERSION = 'v0.7.6',
|
||||
VERSION = 'v0.7.7-rc1',
|
||||
/** Key for the Custom Config's version (librechat.yaml). */
|
||||
CONFIG_VERSION = '1.2.1',
|
||||
/** Standard value for the first message's `parentMessageId` value, to indicate no parent exists. */
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ export const defaultAgentFormValues = {
|
|||
tools: [],
|
||||
provider: {},
|
||||
projectIds: [],
|
||||
artifacts: '',
|
||||
isCollaborative: false,
|
||||
[Tools.execute_code]: false,
|
||||
[Tools.file_search]: false,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import type { AssistantsEndpoint, AgentProvider } from 'src/schemas';
|
|||
import type { ContentTypes } from './runs';
|
||||
import type { Agents } from './agents';
|
||||
import type { TFile } from './files';
|
||||
import { ArtifactModes } from 'src/artifacts';
|
||||
|
||||
export type Schema = OpenAPIV3.SchemaObject & { description?: string };
|
||||
export type Reference = OpenAPIV3.ReferenceObject & { description?: string };
|
||||
|
|
@ -204,6 +205,7 @@ export type Agent = {
|
|||
created_at: number;
|
||||
avatar: AgentAvatar | null;
|
||||
instructions: string | null;
|
||||
additional_instructions?: string | null;
|
||||
tools?: string[];
|
||||
projectIds?: string[];
|
||||
tool_kwargs?: Record<string, unknown>;
|
||||
|
|
@ -217,6 +219,7 @@ export type Agent = {
|
|||
agent_ids?: string[];
|
||||
end_after_tools?: boolean;
|
||||
hide_sequential_outputs?: boolean;
|
||||
artifacts?: ArtifactModes;
|
||||
};
|
||||
|
||||
export type TAgentsMap = Record<string, Agent | undefined>;
|
||||
|
|
@ -231,7 +234,7 @@ export type AgentCreateParams = {
|
|||
provider: AgentProvider;
|
||||
model: string | null;
|
||||
model_parameters: AgentModelParameters;
|
||||
} & Pick<Agent, 'agent_ids' | 'end_after_tools' | 'hide_sequential_outputs'>;
|
||||
} & Pick<Agent, 'agent_ids' | 'end_after_tools' | 'hide_sequential_outputs' | 'artifacts'>;
|
||||
|
||||
export type AgentUpdateParams = {
|
||||
name?: string | null;
|
||||
|
|
@ -247,7 +250,7 @@ export type AgentUpdateParams = {
|
|||
projectIds?: string[];
|
||||
removeProjectIds?: string[];
|
||||
isCollaborative?: boolean;
|
||||
} & Pick<Agent, 'agent_ids' | 'end_after_tools' | 'hide_sequential_outputs'>;
|
||||
} & Pick<Agent, 'agent_ids' | 'end_after_tools' | 'hide_sequential_outputs' | 'artifacts'>;
|
||||
|
||||
export type AgentListParams = {
|
||||
limit?: number;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue