APIRequestBody#
- class langchain_community.tools.openapi.utils.api_models.APIRequestBody[source]#
Bases:
BaseModel
A model for a request body.
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 allow self as a field name.
- param description: str | None [Required]#
The description of the request body.
- param media_type: str [Required]#
The media type of the request body.
- param properties: List[APIRequestBodyProperty] [Required]#
- classmethod from_request_body(request_body: RequestBody, spec: OpenAPISpec) APIRequestBody [source]#
Instantiate from an OpenAPI RequestBody.
- Parameters:
request_body (RequestBody)
spec (OpenAPISpec)
- Return type: