mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-10 01:52:37 +01:00
refactor: add FunctionTool interface and availableTools to AppConfig
This commit is contained in:
parent
550bf56077
commit
28cd234a6c
3 changed files with 14 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ import type {
|
||||||
TCustomEndpoints,
|
TCustomEndpoints,
|
||||||
TAssistantEndpoint,
|
TAssistantEndpoint,
|
||||||
} from 'librechat-data-provider';
|
} from 'librechat-data-provider';
|
||||||
|
import type { FunctionTool } from './tools';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Application configuration object
|
* Application configuration object
|
||||||
|
|
@ -60,6 +61,8 @@ export interface AppConfig {
|
||||||
secureImageLinks?: TCustomConfig['secureImageLinks'];
|
secureImageLinks?: TCustomConfig['secureImageLinks'];
|
||||||
/** Processed model specifications */
|
/** Processed model specifications */
|
||||||
modelSpecs?: TCustomConfig['modelSpecs'];
|
modelSpecs?: TCustomConfig['modelSpecs'];
|
||||||
|
/** Available tools */
|
||||||
|
availableTools?: Record<string, FunctionTool>;
|
||||||
endpoints?: {
|
endpoints?: {
|
||||||
/** OpenAI endpoint configuration */
|
/** OpenAI endpoint configuration */
|
||||||
openAI?: TEndpoint;
|
openAI?: TEndpoint;
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,5 @@ export * from './mistral';
|
||||||
export * from './openai';
|
export * from './openai';
|
||||||
export * from './prompts';
|
export * from './prompts';
|
||||||
export * from './run';
|
export * from './run';
|
||||||
|
export * from './tools';
|
||||||
export * from './zod';
|
export * from './zod';
|
||||||
|
|
|
||||||
10
packages/api/src/types/tools.ts
Normal file
10
packages/api/src/types/tools.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import type { JsonSchemaType } from './zod';
|
||||||
|
|
||||||
|
export interface FunctionTool {
|
||||||
|
type: 'function';
|
||||||
|
function: {
|
||||||
|
description: string;
|
||||||
|
name: string;
|
||||||
|
parameters: JsonSchemaType;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue