requestLLMStructured
Sends a request to LLM and gets a structured response.
Parameters
A configuration defining structures and behavior.
See also
Sends a request to LLM and gets a structured response.
This is a simple version of the full requestLLMStructured
. Unlike the full version, it does not require specifying struct definitions and structured output modes manually. It attempts to find the best approach to provide a structured output based on the defined model capabilities.
Parameters
Serializer for the requested structure type.
Optional list of examples in case manual mode will be used. These examples might help the model to understand the format better.
Optional parser that handles malformed responses by using an auxiliary LLM to intelligently fix parsing errors. When specified, parsing errors trigger additional LLM calls with error context to attempt correction of the structure format.
Sends a request to LLM and gets a structured response.
This is a simple version of the full requestLLMStructured
. Unlike the full version, it does not require specifying struct definitions and structured output modes manually. It attempts to find the best approach to provide a structured output based on the defined model capabilities.
Parameters
The structure to request.
Optional list of examples in case manual mode will be used. These examples might help the model to understand the format better.
Optional parser that handles malformed responses by using an auxiliary LLM to intelligently fix parsing errors. When specified, parsing errors trigger additional LLM calls with error context to attempt correction of the structure format.