Merk
Tilgang til denne siden krever autorisasjon. Du kan prøve å logge på eller endre kataloger.
Tilgang til denne siden krever autorisasjon. Du kan prøve å endre kataloger.
Note
Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.
The knowledge-assistants command group within the Databricks CLI allows you to manage Knowledge Assistants and related resources.
databricks knowledge-assistants create-knowledge-assistant
Create a Knowledge Assistant.
databricks knowledge-assistants create-knowledge-assistant DISPLAY_NAME DESCRIPTION [flags]
Arguments
DISPLAY_NAME
The display name of the Knowledge Assistant, unique at workspace level.
DESCRIPTION
Description of what this assistant can do (user-facing).
Options
--instructions string
Additional global instructions on how the agent should generate answers.
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
--name string
The resource name of the Knowledge Assistant.
Examples
The following example creates a Knowledge Assistant:
databricks knowledge-assistants create-knowledge-assistant "Sales Assistant" "Answers questions about sales data"
databricks knowledge-assistants create-knowledge-source
Create a knowledge source under a Knowledge Assistant.
databricks knowledge-assistants create-knowledge-source PARENT DISPLAY_NAME DESCRIPTION SOURCE_TYPE [flags]
Arguments
PARENT
Parent resource where this source will be created. Format: knowledge-assistants/{knowledge_assistant_id}.
DISPLAY_NAME
Human-readable display name of the knowledge source.
DESCRIPTION
Description of the knowledge source.
SOURCE_TYPE
The type of the source. Supported values: index, files, file_table.
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
--name string
Full resource name: knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}.
Examples
The following example creates a knowledge source:
databricks knowledge-assistants create-knowledge-source knowledge-assistants/my-assistant-id "Sales Docs" "Documentation about sales processes" files
databricks knowledge-assistants delete-knowledge-assistant
Delete a Knowledge Assistant.
databricks knowledge-assistants delete-knowledge-assistant NAME [flags]
Arguments
NAME
The resource name of the knowledge assistant to delete. Format: knowledge-assistants/{knowledge_assistant_id}.
Options
Examples
The following example deletes a Knowledge Assistant:
databricks knowledge-assistants delete-knowledge-assistant knowledge-assistants/my-assistant-id
databricks knowledge-assistants delete-knowledge-source
Delete a knowledge source.
databricks knowledge-assistants delete-knowledge-source NAME [flags]
Arguments
NAME
The resource name of the knowledge source to delete. Format: knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}.
Options
Examples
The following example deletes a knowledge source:
databricks knowledge-assistants delete-knowledge-source knowledge-assistants/my-assistant-id/knowledge-sources/my-source-id
databricks knowledge-assistants get-knowledge-assistant
Get a Knowledge Assistant.
databricks knowledge-assistants get-knowledge-assistant NAME [flags]
Arguments
NAME
The resource name of the knowledge assistant. Format: knowledge-assistants/{knowledge_assistant_id}.
Options
Examples
The following example gets a Knowledge Assistant:
databricks knowledge-assistants get-knowledge-assistant knowledge-assistants/my-assistant-id
databricks knowledge-assistants get-knowledge-source
Get a knowledge source.
databricks knowledge-assistants get-knowledge-source NAME [flags]
Arguments
NAME
The resource name of the knowledge source. Format: knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}.
Options
Examples
The following example gets a knowledge source:
databricks knowledge-assistants get-knowledge-source knowledge-assistants/my-assistant-id/knowledge-sources/my-source-id
databricks knowledge-assistants list-knowledge-assistants
List Knowledge Assistants.
databricks knowledge-assistants list-knowledge-assistants [flags]
Arguments
None
Options
--page-size int
The maximum number of knowledge assistants to return.
--page-token string
A page token, received from a previous list-knowledge-assistants call.
Examples
The following example lists all Knowledge Assistants:
databricks knowledge-assistants list-knowledge-assistants
databricks knowledge-assistants list-knowledge-sources
List knowledge sources under a Knowledge Assistant.
databricks knowledge-assistants list-knowledge-sources PARENT [flags]
Arguments
PARENT
Parent resource to list from. Format: knowledge-assistants/{knowledge_assistant_id}.
Options
--page-size int
The maximum number of knowledge sources to return.
--page-token string
A page token from a previous list call.
Examples
The following example lists knowledge sources for an assistant:
databricks knowledge-assistants list-knowledge-sources knowledge-assistants/my-assistant-id
databricks knowledge-assistants sync-knowledge-sources
Sync all non-index knowledge sources for a Knowledge Assistant. Index sources do not require sync.
databricks knowledge-assistants sync-knowledge-sources NAME [flags]
Arguments
NAME
The resource name of the Knowledge Assistant. Format: knowledge-assistants/{knowledge_assistant_id}.
Options
Examples
The following example syncs all knowledge sources for an assistant:
databricks knowledge-assistants sync-knowledge-sources knowledge-assistants/my-assistant-id
databricks knowledge-assistants update-knowledge-assistant
Update a Knowledge Assistant.
databricks knowledge-assistants update-knowledge-assistant NAME UPDATE_MASK DISPLAY_NAME DESCRIPTION [flags]
Arguments
NAME
The resource name of the Knowledge Assistant. Format: knowledge-assistants/{knowledge_assistant_id}.
UPDATE_MASK
Comma-delimited list of fields to update. Allowed values: display_name, description, instructions.
DISPLAY_NAME
The display name of the Knowledge Assistant.
DESCRIPTION
Description of what this assistant can do.
Options
--instructions string
Additional global instructions on how the agent should generate answers.
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
--name string
The resource name of the Knowledge Assistant.
Examples
The following example updates a Knowledge Assistant's display name:
databricks knowledge-assistants update-knowledge-assistant knowledge-assistants/my-assistant-id display_name "Updated Sales Assistant" "Answers questions about sales data"
databricks knowledge-assistants update-knowledge-source
Update a knowledge source.
databricks knowledge-assistants update-knowledge-source NAME UPDATE_MASK DISPLAY_NAME DESCRIPTION SOURCE_TYPE [flags]
Arguments
NAME
The resource name of the knowledge source to update. Format: knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}.
UPDATE_MASK
Comma-delimited list of fields to update. Allowed values: display_name, description.
DISPLAY_NAME
Human-readable display name of the knowledge source.
DESCRIPTION
Description of the knowledge source.
SOURCE_TYPE
The type of the source. This field is ignored on update.
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
--name string
Full resource name: knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}.
Examples
The following example updates a knowledge source:
databricks knowledge-assistants update-knowledge-source knowledge-assistants/my-assistant-id/knowledge-sources/my-source-id display_name "Updated Sales Docs" "Updated documentation about sales" files
Global flags
--debug
Whether to enable debug logging.
-h or --help
Display help for the Databricks CLI or the related command group or the related command.
--log-file string
A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.
--log-format format
The log format type, text or json. The default value is text.
--log-level string
A string representing the log format level. If not specified then the log format level is disabled.
-o, --output type
The command output type, text or json. The default value is text.
-p, --profile string
The name of the profile in the ~/.databrickscfg file to use to run the command. If this flag is not specified then if it exists, the profile named DEFAULT is used.
--progress-format format
The format to display progress logs: default, append, inplace, or json
-t, --target string
If applicable, the bundle target to use