Skip to main content

BaseConverter

A base class for schema outputs that includes functionality for managing the response format. Parameters:
  • output_schema (Optional[Type[BaseModel]], optional): The expected format of the response. (default: :obj:None)

convert

Structures the input text into the expected response format. Parameters:
  • text (str): The input text to be structured.
  • output_schema (Optional[Type[BaseModel]], optional): The expected format of the response. Defaults to None.
  • prompt (Optional[str], optional): The prompt to be used.
Returns: Any: The converted response.