UNPKG

@hashgraphonline/standards-agent-plugin

Version:

Standards agent plugin for OpenConvAI functionality with HCS-10 tools

48 lines (46 loc) 1.92 kB
import { HederaConversationalAgent, BasePlugin, AgentOperationalMode, AgentResponse, MirrorNodeConfig } from 'hedera-agent-kit'; import { OpenConvAIPlugin } from './plugins/openconvai/OpenConvAIPlugin'; import { IStateManager } from '@hashgraphonline/standards-agent-kit'; import { NetworkType } from '@hashgraphonline/standards-sdk'; export interface StandardsKitOptions { accountId: string; privateKey: string; network?: NetworkType; openAIApiKey: string; openAIModelName?: string; verbose?: boolean; operationalMode?: AgentOperationalMode; userAccountId?: string; customSystemMessagePreamble?: string; customSystemMessagePostamble?: string; additionalPlugins?: BasePlugin[]; stateManager?: IStateManager; scheduleUserTransactionsInBytesMode?: boolean; mirrorNodeConfig?: MirrorNodeConfig; disableLogging?: boolean; } /** * The StandardsKit class is an optional wrapper around the HederaConversationalAgent class, * which includes the OpenConvAIPlugin and the OpenConvaiState by default. * If you want to use a different plugin or state manager, you can pass them in the options. * This class is not required and the plugin can be used directly with the HederaConversationalAgent class. * * @param options - The options for the StandardsKit. * @returns A new instance of the StandardsKit class. */ export declare class StandardsKit { conversationalAgent?: HederaConversationalAgent; plugin: OpenConvAIPlugin; stateManager: IStateManager; private options; private logger; constructor(options: StandardsKitOptions); initialize(): Promise<void>; getPlugin(): OpenConvAIPlugin; getStateManager(): IStateManager; getConversationalAgent(): HederaConversationalAgent; processMessage(message: string, chatHistory?: { type: 'human' | 'ai'; content: string; }[]): Promise<AgentResponse>; }