requestLLMStructured
suspend fun <T : Any> requestLLMStructured(message: String, clazz: KClass<T>, examples: List<T> = emptyList(), fixingParser: ERROR CLASS: Symbol not found for StructureFixingParser?? = null): ERROR CLASS: Symbol not found for Result<ERROR CLASS: Symbol not found for StructuredResponse<T>>(source)
Sends a structured request to the Large Language Model (LLM) and processes the response.
Return
A Result containing a StructuredResponse of the requested type T, or an error if the request fails.
Parameters
message
The input message to be sent to the LLM.
clazz
The Kotlin class type of the expected structured response.
examples
An optional list of example objects used to guide the model's structured response generation.
fixingParser
An optional parser to correct or validate the structured response.
Type Parameters
T
The type of the structured response required.