LLMService
Stentor API Reference / stentor-models/src / LLMService
Interface: LLMService
Defined in: packages/stentor-models/src/Services/LLMService.ts:86
A service that generates text from a prompt sent to an LLM.
The response is raw model output. Callers are responsible for parsing it, and for the fact that a model can return something that does not match the shape that was asked for -- validate what comes back against whatever list or schema the prompt constrained it to, rather than trusting it.
Methodsβ
generate()β
generate(
prompt,options?):Promise<LLMServiceResponse>
Defined in: packages/stentor-models/src/Services/LLMService.ts:95
Generate a response for the given prompt.
Parametersβ
promptβ
The prompt to send.
options?β
Optional parameters, such as a timeout in milliseconds.
timeout?β
number
Returnsβ
Promise<LLMServiceResponse>
The model's response.
Throwsβ
If the underlying service is unavailable or the prompt is invalid.