Module aws_lambda_powertools.utilities.parser.models.bedrock_agent
Expand source code
from typing import Dict, List, Optional
from pydantic import BaseModel, Field
class BedrockAgentModel(BaseModel):
name: str
id_: str = Field(..., alias="id")
alias: str
version: str
class BedrockAgentPropertyModel(BaseModel):
name: str
type_: str = Field(..., alias="type")
value: str
class BedrockAgentRequestMediaModel(BaseModel):
properties: List[BedrockAgentPropertyModel]
class BedrockAgentRequestBodyModel(BaseModel):
content: Dict[str, BedrockAgentRequestMediaModel]
class BedrockAgentEventModel(BaseModel):
message_version: str = Field(..., alias="messageVersion")
input_text: str = Field(..., alias="inputText")
session_id: str = Field(..., alias="sessionId")
action_group: str = Field(..., alias="actionGroup")
api_path: str = Field(..., alias="apiPath")
http_method: str = Field(..., alias="httpMethod")
session_attributes: Dict[str, str] = Field({}, alias="sessionAttributes")
prompt_session_attributes: Dict[str, str] = Field({}, alias="promptSessionAttributes")
agent: BedrockAgentModel
parameters: Optional[List[BedrockAgentPropertyModel]] = None
request_body: Optional[BedrockAgentRequestBodyModel] = Field(None, alias="requestBody")
Classes
class BedrockAgentEventModel (**data: Any)
-
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.
Expand source code
class BedrockAgentEventModel(BaseModel): message_version: str = Field(..., alias="messageVersion") input_text: str = Field(..., alias="inputText") session_id: str = Field(..., alias="sessionId") action_group: str = Field(..., alias="actionGroup") api_path: str = Field(..., alias="apiPath") http_method: str = Field(..., alias="httpMethod") session_attributes: Dict[str, str] = Field({}, alias="sessionAttributes") prompt_session_attributes: Dict[str, str] = Field({}, alias="promptSessionAttributes") agent: BedrockAgentModel parameters: Optional[List[BedrockAgentPropertyModel]] = None request_body: Optional[BedrockAgentRequestBodyModel] = Field(None, alias="requestBody")
Ancestors
- pydantic.main.BaseModel
- pydantic.utils.Representation
Class variables
var action_group : str
var agent : BedrockAgentModel
var api_path : str
var http_method : str
var input_text : str
var message_version : str
var parameters : Optional[List[BedrockAgentPropertyModel]]
var prompt_session_attributes : Dict[str, str]
var request_body : Optional[BedrockAgentRequestBodyModel]
var session_attributes : Dict[str, str]
var session_id : str
class BedrockAgentModel (**data: Any)
-
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.
Expand source code
class BedrockAgentModel(BaseModel): name: str id_: str = Field(..., alias="id") alias: str version: str
Ancestors
- pydantic.main.BaseModel
- pydantic.utils.Representation
Class variables
var alias : str
var id_ : str
var name : str
var version : str
class BedrockAgentPropertyModel (**data: Any)
-
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.
Expand source code
class BedrockAgentPropertyModel(BaseModel): name: str type_: str = Field(..., alias="type") value: str
Ancestors
- pydantic.main.BaseModel
- pydantic.utils.Representation
Class variables
var name : str
var type_ : str
var value : str
class BedrockAgentRequestBodyModel (**data: Any)
-
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.
Expand source code
class BedrockAgentRequestBodyModel(BaseModel): content: Dict[str, BedrockAgentRequestMediaModel]
Ancestors
- pydantic.main.BaseModel
- pydantic.utils.Representation
Class variables
var content : Dict[str, BedrockAgentRequestMediaModel]
class BedrockAgentRequestMediaModel (**data: Any)
-
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.
Expand source code
class BedrockAgentRequestMediaModel(BaseModel): properties: List[BedrockAgentPropertyModel]
Ancestors
- pydantic.main.BaseModel
- pydantic.utils.Representation
Class variables
var properties : List[BedrockAgentPropertyModel]