UNPKG

@nomyx/assistant

Version:

A powerful assistant library and cli for your AI projects. works with Vertex AI (Claude and Gemini)

30 lines (27 loc) 869 B
import { ActionContext, ActionSchema } from '../types/tool'; import { ChatOptions } from '../types/chat'; import { IAIProvider } from '../types/provider'; import { ILogger } from '../types/utils'; import { PromptDefinition } from '../types/common'; export interface Route { condition: string; prompt: string | any; // We'll use 'any' here to avoid circular dependency } export interface ExtendedActionContext extends ActionContext { aiProvider: IAIProvider; logger: ILogger; functionSchemas?: any[]; state?: Record<string, any>; executeAction?: (actionName: string) => Promise<any>; } export interface PromptActionConfig { name: string; schema: ActionSchema<any, any>; systemContent: string; userContent: string; options?: ChatOptions; routing?: Route[]; description?: string; priority?: number; config?: PromptDefinition['config']; }