Generate (Sync)
This API lets you ask questions to the LLMs in a synchronous way. This API corresponds to the completion API.
Use the OptionBuilder
to build the Options
object
with extra parameters.
Refer
to this.
Try asking a question about the model
Loading code...
You will get a response similar to:
LLM Response
I am a model of an AI trained by Mistral AI. I was designed to assist with a wide range of tasks, from answering questions to helping with complex computations and research. How can I help you toda
Try asking a question, receiving the answer streamed
Loading code...
You will get a response similar to:
Generate structured output
With response as a Map
Loading code...
You will get a response similar to:
LLM Response
{
"heroName" : "Batman",
"ageOfPerson" : 30
}
With response mapped to specified class type
Loading code...
LLM Response
HeroInfo(heroName=Batman, ageOfPerson=30)