Interface IPromptParametersService
public interface IPromptParametersService
Service with logic related to prompt input and output parameters, such as
PromptTextParameter or
PromptFileSetParameter. Usage of this service is optional, but may simplify implementation of prompt service
handlers. Obtain instances via CDI.- Since:
- 8.5.0
-
Method Summary
Modifier and TypeMethodDescriptionGets a builder for the file parameters as the input of a prompt query.Gets a builder for a JSON answer as the output of a query.Gets a builder for a text answer as the output of a query.Gets a builder for the text parameters as the input of a query.Gets a builder for extractingtext input parametersfrom a given configuration object.
-
Method Details
-
fileParameterDescriptor
IPromptFileParametersDescriptorBuilder fileParameterDescriptor()Gets a builder for the file parameters as the input of a prompt query. Given a set of configuredfile parameters, derives a suitable file value descriptor. Eachkeywill correspond to a key in thefiles mapof the derived file value descriptor.- Returns:
- A builder for a file parameters descriptor.
-
jsonAnswerDescriptor
IPromptJsonAnswerDescriptorBuilder jsonAnswerDescriptor()Gets a builder for a JSON answer as the output of a query. Given aJsonSchemaOutputmodel, derives the value descriptor for that JSON schema and creates arecord value descriptorwith a single property named"answer"of that type.- Returns:
- A builder for a JSON answer descriptor.
-
textAnswerDescriptor
IPromptTextAnswerDescriptorBuilder textAnswerDescriptor()Gets a builder for a text answer as the output of a query. Creates arecord value descriptorwith a single text property named"answer".- Returns:
- A builder for a text answer descriptor.
-
textParameterDescriptor
IPromptTextParameterDescriptorBuilder textParameterDescriptor()Gets a builder for the text parameters as the input of a query. Given a set of configuredtext parameters, derives a suitable value descriptor. This will be arecord value descriptorwith a field for eachtext parameter name.- Returns:
- A builder for a text parameters descriptor.
-
textParameterExtractor
IPromptTextInputParamsBuilder textParameterExtractor()Gets a builder for extractingtext input parametersfrom a given configuration object.- Returns:
- A builder for extracting text input parameters.
-