adk-typescript
Version:
TypeScript port of Google's Agent Development Kit (ADK)
61 lines (60 loc) • 2.41 kB
TypeScript
/**
* Module for creating LLM request processors that provide standard instructions.
*/
import { InvocationContext } from '../../agents/InvocationContext';
import { Event } from '../../events/Event';
import { LlmRequest } from '../../models/LlmRequest';
import { BaseLlmRequestProcessor } from './BaseLlmProcessor';
/**
* Handles instructions and global instructions for LLM flow.
*/
declare class InstructionsLlmRequestProcessor implements BaseLlmRequestProcessor {
/**
* Runs the processor asynchronously.
*
* @param invocationContext The invocation context
* @param llmRequest The LLM request to process
* @returns An async generator yielding events
*/
runAsync(invocationContext: InvocationContext, llmRequest: LlmRequest): AsyncGenerator<Event, void, unknown>;
}
/**
* The main instructions request processor instance.
*/
export declare const requestProcessor: InstructionsLlmRequestProcessor;
/**
* Creates a LLM request processor that adds instructions to the request.
*
* @param instructionText The instruction text to add
* @returns A LLM request processor that adds the instruction
*/
export declare function makeInstructionsRequestProcessor(instructionText: string): BaseLlmRequestProcessor;
/**
* A request processor that instructs the LLM to be brief in its responses.
*/
export declare const briefRequestProcessor: BaseLlmRequestProcessor;
/**
* A request processor that instructs the LLM to be extremely brief and focused.
*/
export declare const extremelyBriefRequestProcessor: BaseLlmRequestProcessor;
/**
* A request processor that instructs the LLM to provide detailed explanations.
*/
export declare const detailedRequestProcessor: BaseLlmRequestProcessor;
/**
* A request processor that instructs the LLM to respond in a straightforward way.
*/
export declare const straightForwardRequestProcessor: BaseLlmRequestProcessor;
/**
* A request processor that instructs the LLM to respond in an efficient manner.
*/
export declare const efficientRequestProcessor: BaseLlmRequestProcessor;
/**
* A request processor that instructs the LLM to provide clear step-by-step explanations.
*/
export declare const stepByStepRequestProcessor: BaseLlmRequestProcessor;
/**
* A request processor that instructs the LLM to be helpful, harmless, and honest.
*/
export declare const safetyRequestProcessor: BaseLlmRequestProcessor;
export {};