openvino-genai-node
Version:
OpenVINO™ GenAI pipelines for using from Node.js environment
36 lines (35 loc) • 1.17 kB
TypeScript
/**
* Base type for parsers that process complete text content at the end of generation.
*/
export type Parser = {
/**
* Parse complete text content at the end of generate call.
*
* This method processes the entire text content and extracts or modifies
* information as needed. The results are stored in the provided message.
*
* @param message Message containing the text to parse and to store results
*/
parse: (message: Record<string, unknown>) => void;
};
export interface ReasoningParserOptions {
expectOpenTag?: boolean;
keepOriginalContent?: boolean;
openTag?: string;
closeTag?: string;
}
export interface IReasoningParser extends Parser {
new (options?: ReasoningParserOptions): IReasoningParser;
}
export interface IDeepSeekR1ReasoningParser extends IReasoningParser {
new (): IDeepSeekR1ReasoningParser;
}
export interface IPhi4ReasoningParser extends Parser {
new (): IPhi4ReasoningParser;
}
export interface ILlama3PythonicToolParser extends Parser {
new (): ILlama3PythonicToolParser;
}
export interface ILlama3JsonToolParser extends Parser {
new (): ILlama3JsonToolParser;
}