feat: add schemas and types

This commit is contained in:
Dustin Healy 2025-09-03 19:34:59 -07:00
parent d91f34dd42
commit c0ae6f277f
3 changed files with 9 additions and 2 deletions

View file

@ -9,10 +9,10 @@ import type {
TConversationTag,
TAttachment,
} from './schemas';
import type { Agent, AgentToolResources } from './types/assistants';
import type { SettingDefinition } from './generate';
import type { TMinimalFeedback } from './feedback';
import type { ContentTypes } from './types/runs';
import type { Agent } from './types/assistants';
export * from './schemas';
@ -499,6 +499,7 @@ export type TPrompt = {
author: string;
prompt: string;
type: 'text' | 'chat';
tool_resources?: AgentToolResources;
createdAt: string;
updatedAt: string;
_id?: string;
@ -521,7 +522,7 @@ export type TPromptGroup = {
};
export type TCreatePrompt = {
prompt: Pick<TPrompt, 'prompt' | 'type'> & { groupId?: string };
prompt: Pick<TPrompt, 'prompt' | 'type' | 'tool_resources'> & { groupId?: string };
group?: { name: string; category?: string; oneliner?: string; command?: string };
};

View file

@ -23,6 +23,10 @@ const promptSchema: Schema<IPrompt> = new Schema(
enum: ['text', 'chat'],
required: true,
},
tool_resources: {
type: Schema.Types.Mixed,
default: {},
},
},
{
timestamps: true,

View file

@ -1,3 +1,4 @@
import type { AgentToolResources } from 'librechat-data-provider';
import type { Document, Types } from 'mongoose';
export interface IPrompt extends Document {
@ -5,6 +6,7 @@ export interface IPrompt extends Document {
author: Types.ObjectId;
prompt: string;
type: 'text' | 'chat';
tool_resources?: AgentToolResources;
createdAt?: Date;
updatedAt?: Date;
}