OpenaiEmbedRequestSpecification
Specification for matching OpenAI embedding requests.
This class is used to specify the criteria for matching requests to the OpenAI embeddings endpoint. It allows specifying the model, input (string or list of strings), dimensions, encoding format, and user ID.
See also
Properties
The number of dimensions the resulting output embeddings should have
The format to return the embeddings in
The request body matchers
Additional string matchers for the request body
The string input to match in the request
The list of string inputs to match in the request
Functions
Sets the number of dimensions the resulting output embeddings should have.
Sets the encoding format for the embedding request.
Adds a matcher that checks if the input contains the specified substring.
Sets the model ID criterion for matching embedding requests.
Sets the full request body for embedding request matching.
Adds a string matcher to the list of request body matchers for this specification.
Adds a string matcher to the list of request body matchers for this specification.
Sets a single string input for embedding generation, clearing any existing list input.
Sets the list of string inputs for embedding generation, clearing any previously set single string input.
Sets the user identifier for the embedding request.