guidellm.request
GenerationRequest
Bases: StandardBaseModel
A class representing a request for generation. This class is used to encapsulate the details of a generation request, including the request ID, type, content, parameters, statistics, and constraints. It is designed to be used with the BackendRequestsWorker class to handle the generation process.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request_id | The unique identifier for the request. | required | |
request_type | The type of request (e.g., text, chat). | required | |
content | The content for the request to send to the backend. If request_type is 'text', this should be a string or list of strings which will be resolved by backend.text_completions. If request_type is 'chat', this should be a string, a list of (str, Dict[str, Union[str, Dict[str, str]], Path, Image]), or Any raw content which will be resolved by backend.chat_completions. If raw content, raw_content=True must be passed in the params. | required | |
params | Additional parameters for the request passed in as kwargs. For an http backend, these are passed into the body of the request. | required | |
stats | Statistics for the request, such as the number of prompt tokens. Used for tracking and reporting purposes. | required | |
constraints | Constraints for the request, such as the maximum number of output tokens. Used for controlling the behavior of the backend. | required |