@hashgraphonline/conversational-agent
Version:
Hashgraph Online conversational AI agent implementing HCS-10 communication, HCS-2 registries, and content inscription on Hedera
105 lines (103 loc) • 2.87 kB
TypeScript
import { StructuredTool } from '@langchain/core/tools';
import { z } from 'zod';
declare const ResolveEntitiesSchema: z.ZodObject<{
message: z.ZodString;
entities: z.ZodArray<z.ZodObject<{
entityId: z.ZodString;
entityName: z.ZodString;
entityType: z.ZodString;
}, "strip", z.ZodTypeAny, {
entityId: string;
entityName: string;
entityType: string;
}, {
entityId: string;
entityName: string;
entityType: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
message: string;
entities: {
entityId: string;
entityName: string;
entityType: string;
}[];
}, {
message: string;
entities: {
entityId: string;
entityName: string;
entityType: string;
}[];
}>;
declare const ExtractEntitiesSchema: z.ZodObject<{
response: z.ZodString;
userMessage: z.ZodString;
}, "strip", z.ZodTypeAny, {
response: string;
userMessage: string;
}, {
response: string;
userMessage: string;
}>;
export declare class ResolveEntitiesTool extends StructuredTool {
name: string;
description: string;
schema: z.ZodObject<{
message: z.ZodString;
entities: z.ZodArray<z.ZodObject<{
entityId: z.ZodString;
entityName: z.ZodString;
entityType: z.ZodString;
}, "strip", z.ZodTypeAny, {
entityId: string;
entityName: string;
entityType: string;
}, {
entityId: string;
entityName: string;
entityType: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
message: string;
entities: {
entityId: string;
entityName: string;
entityType: string;
}[];
}, {
message: string;
entities: {
entityId: string;
entityName: string;
entityType: string;
}[];
}>;
private llm;
constructor(apiKey: string, modelName?: string);
_call(input: z.infer<typeof ResolveEntitiesSchema>): Promise<string>;
private groupEntitiesByType;
private buildEntityContext;
}
export declare class ExtractEntitiesTool extends StructuredTool {
name: string;
description: string;
schema: z.ZodObject<{
response: z.ZodString;
userMessage: z.ZodString;
}, "strip", z.ZodTypeAny, {
response: string;
userMessage: string;
}, {
response: string;
userMessage: string;
}>;
private llm;
constructor(apiKey: string, modelName?: string);
_call(input: z.infer<typeof ExtractEntitiesSchema>): Promise<string>;
}
export declare function createEntityTools(apiKey: string, modelName?: string): {
resolveEntities: ResolveEntitiesTool;
extractEntities: ExtractEntitiesTool;
};
export {};