KnowledgeBaseDetail

class openapi_client.models.knowledge_base_detail.KnowledgeBaseDetail(**data)[source]

Bases: BaseModel

Detailed information about a knowledge base, including its associated data sources.

knowledgebase_id: Optional[StrictStr]
knowledgebase_name: Optional[StrictStr]
embedding_model: Optional[StrictStr]
description: Optional[StrictStr]
knowledgebase_status: Optional[StrictStr]
creation_time: Optional[datetime]
created_by: Optional[StrictStr]
last_modified_time: Optional[datetime]
last_modified_by: Optional[StrictStr]
last_synced_time: Optional[datetime]
last_synced_status: Optional[StrictStr]
keywords: Optional[List[StrictStr]]
sort_key: Optional[StrictStr]
access_type: Optional[StrictStr]
metrics: Optional[KnowledgeBaseDetailMetrics]
source_details: Optional[List[SourceDetail]]
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].

to_str()[source]

Returns the string representation of the model using alias

Return type:

str

to_json()[source]

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str)[source]

Create an instance of KnowledgeBaseDetail 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 KnowledgeBaseDetail from a dict

Return type:

Optional[Self]

model_fields: ClassVar[dict[str, FieldInfo]] = {'access_type': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='AccessType', alias_priority=2, description='The access type for the knowledge base (e.g., owner, shared).'), 'created_by': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='CreatedBy', alias_priority=2, description='The ID of the user who created the knowledge base.'), 'creation_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, alias='CreationTime', alias_priority=2, description='Timestamp when the knowledge base was created.'), 'description': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='Description', alias_priority=2, description='The description of the knowledge base.'), 'embedding_model': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='EmbeddingModel', alias_priority=2, description='The embedding model used for the knowledge base.'), 'keywords': FieldInfo(annotation=Union[List[Annotated[str, Strict(strict=True)]], NoneType], required=False, alias='Keywords', alias_priority=2, description='List of keywords associated with the knowledge base.'), 'knowledgebase_id': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='KnowledgebaseId', alias_priority=2, description='The unique identifier of the knowledge base.'), 'knowledgebase_name': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='KnowledgebaseName', alias_priority=2, description='The name of the knowledge base.'), 'knowledgebase_status': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='KnowledgebaseStatus', alias_priority=2, description='The current status of the knowledge base (e.g., CREATING, ACTIVE, FAILED).'), 'last_modified_by': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='LastModifiedBy', alias_priority=2, description='The ID of the user who last modified the knowledge base.'), 'last_modified_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, alias='LastModifiedTime', alias_priority=2, description='Timestamp when the knowledge base was last modified.'), 'last_synced_status': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='LastSyncedStatus', alias_priority=2, description="Status of the last synchronization attempt (e.g., SUCCEEDED, FAILED). 'N/A' if never synced."), 'last_synced_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, alias='LastSyncedTime', alias_priority=2, description="Timestamp of the last successful synchronization. 'N/A' if never synced."), 'metrics': FieldInfo(annotation=Union[KnowledgeBaseDetailMetrics, NoneType], required=False, alias='Metrics', alias_priority=2), 'sort_key': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='SortKey', alias_priority=2, description='The sort key used for organizing the knowledge base.'), 'source_details': FieldInfo(annotation=Union[List[SourceDetail], NoneType], required=False, alias='SourceDetails', alias_priority=2, description='A list of data sources associated with this knowledge base.')}

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