Skip to main content

Knowledge Source

View as Markdown

KnowledgeSource object

KnowledgeSource represents a source of knowledge for the KnowledgeAssistant. Used in create/update requests and returned in Get/List responses. Note: REQUIRED annotations below represent create-time requirements. For updates, required fields are determined by the update mask.

namestringBeta

Full resource name: knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}

display_namestringBeta

Human-readable display name of the knowledge source. Required when creating a Knowledge Source. When updating a Knowledge Source, optional unless included in update_mask.

descriptionstringBeta

Description of the knowledge source. Required when creating a Knowledge Source. When updating a Knowledge Source, optional unless included in update_mask.

source_typestringBeta

The type of the source: "index", "files", or "file_table". Required when creating a Knowledge Source. When updating a Knowledge Source, this field is ignored.

indexobjectBeta
Show child attributesHide child attributes
index_namestringBeta

Full UC name of the vector search index, in the format of {CATALOG}.{SCHEMA}.{INDEX_NAME}.

text_colstringBeta

The column that includes the document text for retrieval.

doc_uri_colstringBeta

The column that specifies a link or reference to where the information came from.

filesobjectBeta
Show child attributesHide child attributes
pathstringBeta

A UC volume path that includes a list of files.

file_tableobjectBeta
Show child attributesHide child attributes
table_namestringBeta

Full UC name of the table, in the format of {CATALOG}.{SCHEMA}.{TABLE_NAME}.

file_colstringBeta

The name of the column containing BINARY file content to be indexed.

statestringBetaOutput only

Values: STATE_UNSPECIFIED, UPDATING, UPDATED, FAILED_UPDATE

idstringBetaOutput only
knowledge_cutoff_timestringBetaOutput only

Timestamp representing the cutoff before which content in this knowledge source is being ingested.

create_timestringBetaOutput only

Timestamp when this knowledge source was created.

Get a Knowledge Source Beta

GET /api/2.1/{name=knowledge-assistants/*/knowledge-sources/*}

Gets a Knowledge Source.

API scopes: knowledge-assistants

Parameters

namestringRequiredpath

The resource name of the Knowledge Source. Format: knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}

Response

Returns the KnowledgeSource object.

List Knowledge Sources Beta

GET /api/2.1/{parent=knowledge-assistants/*}/knowledge-sources

Lists Knowledge Sources under a Knowledge Assistant.

API scopes: knowledge-assistants

Parameters

parentstringRequiredpath

Parent resource to list from. Format: knowledge-assistants/{knowledge_assistant_id}

page_sizeint32query

Constraints: [ 1 .. 100 ]

page_tokenstringquery

Response

Returns a list of KnowledgeSource objects.

Create a Knowledge Source Beta

POST /api/2.1/{parent=knowledge-assistants/*}/knowledge-sources

Creates a Knowledge Source under a Knowledge Assistant.

API scopes: knowledge-assistants

Parameters

parentstringRequiredpath

Parent resource where this source will be created. Format: knowledge-assistants/{knowledge_assistant_id}

Request body

knowledge_sourceobjectRequired
Show child attributesHide child attributes
namestring

Full resource name: knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}

display_namestringRequired

Human-readable display name of the knowledge source. Required when creating a Knowledge Source. When updating a Knowledge Source, optional unless included in update_mask.

descriptionstringRequired

Description of the knowledge source. Required when creating a Knowledge Source. When updating a Knowledge Source, optional unless included in update_mask.

source_typestringRequired

The type of the source: "index", "files", or "file_table". Required when creating a Knowledge Source. When updating a Knowledge Source, this field is ignored.

indexobject
Show child attributesHide child attributes
index_namestringRequired

Full UC name of the vector search index, in the format of {CATALOG}.{SCHEMA}.{INDEX_NAME}.

text_colstringRequired

The column that includes the document text for retrieval.

doc_uri_colstringRequired

The column that specifies a link or reference to where the information came from.

filesobject
Show child attributesHide child attributes
pathstringRequired

A UC volume path that includes a list of files.

file_tableobject
Show child attributesHide child attributes
table_namestringRequired

Full UC name of the table, in the format of {CATALOG}.{SCHEMA}.{TABLE_NAME}.

file_colstringRequired

The name of the column containing BINARY file content to be indexed.

Response

Returns the KnowledgeSource object.

Update a Knowledge Source Beta

PATCH /api/2.1/{name=knowledge-assistants/*/knowledge-sources/*}

Updates a Knowledge Source.

API scopes: knowledge-assistants

Parameters

namestringRequiredpath

The resource name of the Knowledge Source to update. Format: knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}

update_maskstringRequiredquery

Comma-delimited list of fields to update on the Knowledge Source. Allowed values: display_name, description. Examples:

  • display_name
  • display_name,description

Request body

knowledge_sourceobjectRequired

The Knowledge Source update payload. Only fields listed in update_mask are updated. REQUIRED annotations on Knowledge Source fields describe create-time requirements and do not mean all those fields are required for update.

Show child attributesHide child attributes
namestring

Full resource name: knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}

display_namestringRequired

Human-readable display name of the knowledge source. Required when creating a Knowledge Source. When updating a Knowledge Source, optional unless included in update_mask.

descriptionstringRequired

Description of the knowledge source. Required when creating a Knowledge Source. When updating a Knowledge Source, optional unless included in update_mask.

source_typestringRequired

The type of the source: "index", "files", or "file_table". Required when creating a Knowledge Source. When updating a Knowledge Source, this field is ignored.

indexobject
Show child attributesHide child attributes
index_namestringRequired

Full UC name of the vector search index, in the format of {CATALOG}.{SCHEMA}.{INDEX_NAME}.

text_colstringRequired

The column that includes the document text for retrieval.

doc_uri_colstringRequired

The column that specifies a link or reference to where the information came from.

filesobject
Show child attributesHide child attributes
pathstringRequired

A UC volume path that includes a list of files.

file_tableobject
Show child attributesHide child attributes
table_namestringRequired

Full UC name of the table, in the format of {CATALOG}.{SCHEMA}.{TABLE_NAME}.

file_colstringRequired

The name of the column containing BINARY file content to be indexed.

Response

Returns the KnowledgeSource object.

Delete a Knowledge Source Beta

DELETE /api/2.1/{name=knowledge-assistants/*/knowledge-sources/*}

Deletes a Knowledge Source.

API scopes: knowledge-assistants

Parameters

namestringRequiredpath

The resource name of the Knowledge Source to delete. Format: knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}