aiq.tool.server_tools#
Classes#
A simple tool that demonstrates how to retrieve user-defined request attributes from HTTP requests |
Functions#
|
Module Contents#
- class RequestAttributesTool(/, **data: Any)#
Bases:
aiq.data_models.function.FunctionBaseConfig
A simple tool that demonstrates how to retrieve user-defined request attributes from HTTP requests within workflow tools. Please refer to the ‘general’ section of the configuration file located in the ‘examples/simple_calculator/configs/config-metadata.yml’ directory to see how to define a custom route using a YAML file and associate it with a corresponding function to acquire request attributes.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.
- async current_request_attributes(
- config: RequestAttributesTool,
- builder: aiq.builder.builder.Builder,