CapabilityHost Class
Note
This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
Initialize a CapabilityHost instance. Capabilityhost management is controlled by MLClient's capabilityhosts operations.
Constructor
CapabilityHost(*, name: str, description: str | None = None, vector_store_connections: List[str] | None = None, ai_services_connections: List[str] | None = None, storage_connections: List[str] | None = None, thread_storage_connections: List[str] | None = None, capability_host_kind: str | CapabilityHostKind = CapabilityHostKind.AGENTS, **kwargs: Any)
Parameters
| Name | Description |
|---|---|
|
kwargs
Required
|
Additional keyword arguments. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
name
|
The name of the capability host. |
|
description
|
The description of the capability host. Default value: None
|
|
vector_store_connections
|
A list of vector store (AI Search) connections. Default value: None
|
|
ai_services_connections
|
A list of OpenAI service connection. Default value: None
|
|
storage_connections
|
A list of storage connections. Default storage connection value is projectname/workspaceblobstore for project workspace. Default value: None
|
|
thread_storage_connections
|
A list of cosmos db connections, which will be used for thread storage. Default value: None
|
|
capability_host_kind
|
The kind of capability host, either as a string or CapabilityHostKind enum. Default is AGENTS. Default value: CapabilityHostKind.AGENTS
|
Examples
Create a CapabilityHost object.
from azure.ai.ml.constants._workspace import CapabilityHostKind
from azure.ai.ml.entities._workspace._ai_workspaces.capability_host import CapabilityHost
# CapabilityHost in Hub workspace. For Hub workspace, only name and description are required.
capability_host = CapabilityHost(
name="test-capability-host",
description="some description",
capability_host_kind=CapabilityHostKind.AGENTS,
)
# CapabilityHost in Project workspace
capability_host = CapabilityHost(
name="test-capability-host",
description="some description",
capability_host_kind=CapabilityHostKind.AGENTS,
ai_services_connections=["connection1"],
storage_connections=["projectname/workspaceblobstore"],
vector_store_connections=["connection1"],
thread_storage_connections=["connection1"],
)
Methods
| dump |
Dump the CapabilityHost content into a file in yaml format. |
dump
Dump the CapabilityHost content into a file in yaml format.
dump(dest: str | PathLike | IO | None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
dest
Required
|
The destination to receive this CapabilityHost's content. Must be either a path to a local file, or an already-open file stream. If dest is a file path, a new file will be created, and an exception is raised if the file exists. If dest is an open file, the file will be written to directly, and an exception will be raised if the file is not writable. |
Attributes
base_path
creation_context
The creation context of the resource.
Returns
| Type | Description |
|---|---|
|
The creation metadata for the resource. |