UNPKG

@eko-ai/eko

Version:

Empowering language to transform human words into action.

27 lines 1.62 kB
import { Agent } from "../agent"; import { DialogueTool } from "../types"; import { Tool, ToolSchema } from "../types/tools.types"; import { LanguageModelV2FunctionTool } from "@ai-sdk/provider"; export declare function sleep(time: number): Promise<void>; export declare function uuidv4(): string; export declare function call_timeout<R extends Promise<any>>(fun: () => R, timeout: number, error_callback?: (e: string) => void): Promise<R>; export declare function convertToolSchema(tool: ToolSchema): LanguageModelV2FunctionTool; export declare function toImage(mediaData: string): Uint8Array | string | URL; export declare function toFile(mediaData: string, type?: "base64|url" | "binary|url"): Uint8Array | string | URL; export declare function getMimeType(data: string): string; export declare function compressImageData(imageBase64: string, imageType: "image/jpeg" | "image/png", compress: { scale: number; } | { resizeWidth: number; resizeHeight: number; }, quality?: number): Promise<{ imageBase64: string; imageType: "image/jpeg" | "image/png"; }>; export declare function mergeTools<T extends Tool | DialogueTool | LanguageModelV2FunctionTool>(tools1: T[], tools2: T[]): T[]; export declare function mergeAgents(agents1: Agent[], agents2: Agent[]): Agent[]; export declare function sub(str: string, maxLength: number, appendPoint?: boolean, showTruncated?: boolean): string; export declare function fixJson(code: string): any; export declare function fixXmlTag(code: string): string; export declare function loadPackage(packageName: string): Promise<any>; //# sourceMappingURL=utils.d.ts.map