Calls the parser with a given input and optional configuration options.
If the input is a string, it creates a generation with the input as
text and calls parseResult. If the input is a BaseMessage, it
creates a generation with the input as a message and the content of the
input as text, and then calls parseResult.
invoke(
input: string | BaseMessage<MessageStructure<MessageToolSet>, MessageType>,
options: RunnableConfig<Record<string, any>>
): Promise<string>| Name | Type | Description |
|---|---|---|
input* | string | BaseMessage<MessageStructure<MessageToolSet>, MessageType> | The input to the parser, which can be a string or a |
options | RunnableConfig<Record<string, any>> | Optional configuration options. |