llamaindex
Version:
<p align="center"> <img height="100" width="100" alt="LlamaIndex logo" src="https://ts.llamaindex.ai/square.svg" /> </p> <h1 align="center">LlamaIndex.TS</h1> <h3 align="center"> Data framework for your LLM application. </h3>
15 lines (14 loc) • 422 B
TypeScript
import type { BaseOutputParser } from "@llamaindex/core/schema";
import type { StructuredOutput } from "../types.js";
export type Answer = {
choice: number;
reason: string;
};
export declare class SelectionOutputParser implements BaseOutputParser<StructuredOutput<Answer[]>> {
/**
*
* @param output
*/
parse(output: string): StructuredOutput<Answer[]>;
format(output: string): string;
}