langchain.tools.openapi.utils.api_models.APIRequestBody¶
- class langchain.tools.openapi.utils.api_models.APIRequestBody(*, description: Optional[str] = None, properties: List[APIRequestBodyProperty], media_type: str)[source]¶
Bases:
BaseModelA model for a request body.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- param description: Optional[str] = None¶
The description of the request body.
- param media_type: str [Required]¶
The media type of the request body.
- param properties: List[langchain.tools.openapi.utils.api_models.APIRequestBodyProperty] [Required]¶
- classmethod from_request_body(request_body: RequestBody, spec: OpenAPISpec) APIRequestBody[source]¶
Instantiate from an OpenAPI RequestBody.