UNPKG

@langchain/core

Version:
21 lines • 1.14 kB
import { BaseMessage } from "../messages/base.cjs"; import { BaseOutputParser } from "./base.cjs"; import "../messages/index.cjs"; import { Callbacks } from "../callbacks/manager.cjs"; import { ChatGeneration, Generation } from "../outputs.cjs"; import { StandardSchemaV1 } from "@standard-schema/spec"; export declare class StandardSchemaOutputParser<RunOutput extends Record<string, any> = Record<string, any>> extends BaseOutputParser<RunOutput> { static lc_name(): string; lc_namespace: string[]; private readonly schema; constructor(schema: StandardSchemaV1<RunOutput>); static fromSerializableSchema<RunOutput extends Record<string, any> = Record<string, any>>(schema: StandardSchemaV1<RunOutput>): StandardSchemaOutputParser<RunOutput>; /** * @throws {ModelRefusalError} If the model refused instead of answering. */ parseResult(generations: Generation[] | ChatGeneration[], callbacks?: Callbacks): Promise<RunOutput>; parse(text: string): Promise<RunOutput>; protected _baseMessageToString(message: BaseMessage): string; getFormatInstructions(): string; } //# sourceMappingURL=standard_schema.d.cts.map