gaunt-sloth-assistant
Version:
[](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [ • 1.28 kB
TypeScript
import type { Message } from '#src/modules/types.js';
import { GthConfig } from '#src/config.js';
import { BaseCheckpointSaver } from '@langchain/langgraph';
import { GthAgentInterface, GthCommand } from '#src/core/types.js';
import { StatusUpdateCallback } from '#src/core/GthLangChainAgent.js';
/**
* Agent simplifies interaction with LLM and reduces it to calling a few methods
* {@link GthAgentRunner#init} and {@link GthAgentRunner#processMessages}.
*/
export declare class GthAgentRunner {
private statusUpdate;
private agent;
private config;
private runConfig;
constructor(statusUpdate: StatusUpdateCallback);
/**
* Init is split into a separate method. This may create a number of connections,
* and we'd better have an instance by that moment, for the case things will go wrong,
* so we can wrap init into try-catch and then call {@link #cleanup} within finally.
*/
init(command: GthCommand | undefined, configIn: GthConfig, checkpointSaver?: BaseCheckpointSaver | undefined): Promise<void>;
/**
* processMessages deals with both streaming and non-streaming approaches.
*/
processMessages(messages: Message[]): Promise<string>;
getAgent(): GthAgentInterface | null;
cleanup(): Promise<void>;
}