mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-24 04:10:15 +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,
|
||||
TAssistantEndpoint,
|
||||
} from 'librechat-data-provider';
|
||||
import type { FunctionTool } from './tools';
|
||||
|
||||
/**
|
||||
* Application configuration object
|
||||
|
|
@ -60,6 +61,8 @@ export interface AppConfig {
|
|||
secureImageLinks?: TCustomConfig['secureImageLinks'];
|
||||
/** Processed model specifications */
|
||||
modelSpecs?: TCustomConfig['modelSpecs'];
|
||||
/** Available tools */
|
||||
availableTools?: Record<string, FunctionTool>;
|
||||
endpoints?: {
|
||||
/** OpenAI endpoint configuration */
|
||||
openAI?: TEndpoint;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,5 @@ export * from './mistral';
|
|||
export * from './openai';
|
||||
export * from './prompts';
|
||||
export * from './run';
|
||||
export * from './tools';
|
||||
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