CreateAgentRequestBody¶
- class openapi_client.models.create_agent_request_body.CreateAgentRequestBody(**data)[source]¶
Bases:
BaseModel- agent_id: Annotated[str, Field(strict=True)]¶
- agent_name: Annotated[str, Field(strict=True)]¶
- description: Annotated[str, Field(strict=True)]¶
- instruction: Annotated[str, Field(strict=True)]¶
- model_id: Annotated[str, Field(strict=True)]¶
- agent_response_type: Optional[Annotated[str, Field(strict=True)]]¶
- tools: Annotated[List[AgentToolObject], Field(max_length=10)]¶
- cost_tags: Optional[List[FileAddDeleteFileLevelTagsInner]]¶
- resource_access_metadata: Optional[CreateAgentRequestBodyResourceAccessMetadata]¶
- classmethod description_validate_regular_expression(value)[source]¶
Validates the regular expression
- classmethod instruction_validate_regular_expression(value)[source]¶
Validates the regular expression
- classmethod agent_response_type_validate_regular_expression(value)[source]¶
Validates the regular expression
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod from_json(json_str)[source]¶
Create an instance of CreateAgentRequestBody from a JSON string
- Return type:
Optional[Self]
- to_dict()[source]¶
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- Return type:
Dict[str,Any]
- classmethod from_dict(obj)[source]¶
Create an instance of CreateAgentRequestBody from a dict
- Return type:
Optional[Self]
- model_fields: ClassVar[dict[str, FieldInfo]] = {'agent_id': FieldInfo(annotation=str, required=True, alias='AgentId', alias_priority=2, description='Unique identifier for the agent', metadata=[Strict(strict=True)]), 'agent_name': FieldInfo(annotation=str, required=True, alias='AgentName', alias_priority=2, description='Name of the agent', metadata=[Strict(strict=True)]), 'agent_response_type': FieldInfo(annotation=Union[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])], NoneType], required=False, alias='AgentResponseType', alias_priority=2, description='Type of response format (optional)'), 'cost_tags': FieldInfo(annotation=Union[List[FileAddDeleteFileLevelTagsInner], NoneType], required=False, alias='CostTags', alias_priority=2), 'description': FieldInfo(annotation=str, required=True, alias='Description', alias_priority=2, description='Description of the agent', metadata=[Strict(strict=True)]), 'instruction': FieldInfo(annotation=str, required=True, alias='Instruction', alias_priority=2, description='Instructions for the agent', metadata=[Strict(strict=True)]), 'model_id': FieldInfo(annotation=str, required=True, alias='ModelId', alias_priority=2, description='ID of the AI model to use', metadata=[Strict(strict=True)]), 'resource_access_metadata': FieldInfo(annotation=Union[CreateAgentRequestBodyResourceAccessMetadata, NoneType], required=False, alias='ResourceAccessMetadata', alias_priority=2), 'tools': FieldInfo(annotation=List[AgentToolObject], required=True, alias='Tools', alias_priority=2, description='List of tools available to the agent', metadata=[MaxLen(max_length=10)])}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- model_post_init(__context)¶
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self (
BaseModel) – The BaseModel instance.__context (
Any) – The context.
- Return type:
None