steamship.client package#
Submodules#
steamship.client.skill_to_provider module#
steamship.client.skills module#
steamship.client.steamship module#
- class steamship.client.steamship.Steamship(api_key: str = None, api_base: str = None, app_base: str = None, web_base: str = None, workspace: str = None, fail_if_workspace_exists: bool = False, profile: str = None, config_file: str = None, config: Configuration = None, trust_workspace_config: bool = False)[source]#
Bases:
Client
Steamship Python Client.
- embed_and_search(query: str, docs: List[str], plugin_instance: str, k: int = 1) QueryResults [source]#
- static temporary_workspace(**kwargs) Generator[Steamship, None, None] [source]#
Create a client rooted in a temporary workspace that will be deleted after use.
- static use(package_handle: str, instance_handle: str | None = None, config: Dict[str, Any] | None = None, version: str | None = None, fetch_if_exists: bool = True, workspace_handle: str | None = None, wait_for_init: bool = True, **kwargs) PackageInstance [source]#
Creates/loads an instance of package package_handle.
The instance is named instance_handle and located in the Workspace named instance_handle. If no instance_handle is provided, the default is package_handle.
For example, one may write the following to always get back the same package instance, no matter how many times you run it, scoped into its own workspace:
`python instance = Steamship.use('package-handle', 'instance-handle') `
One may also write:
`python instance = Steamship.use('package-handle') # Instance will also be named `package-handle` `
If you wish to override the usage of a workspace named instance_handle, you can provide the workspace_handle parameter.
- static use_plugin(plugin_handle: str, instance_handle: str | None = None, config: Dict[str, Any] | None = None, version: str | None = None, fetch_if_exists: bool = True, workspace_handle: str | None = None, wait_for_init: bool = True, **kwargs) PluginInstance [source]#
Creates/loads an instance of plugin plugin_handle.
The instance is named instance_handle and located in the Workspace named instance_handle. If no instance_handle is provided, the default is plugin_handle.
For example, one may write the following to always get back the same plugin instance, no matter how many times you run it, scoped into its own workspace:
`python instance = Steamship.use_plugin('plugin-handle', 'instance-handle') `
One may also write:
`python instance = Steamship.use('plugin-handle') # Instance will also be named `plugin-handle` `
steamship.client.vendors module#
Module contents#
- class steamship.client.Steamship(api_key: str = None, api_base: str = None, app_base: str = None, web_base: str = None, workspace: str = None, fail_if_workspace_exists: bool = False, profile: str = None, config_file: str = None, config: Configuration = None, trust_workspace_config: bool = False)[source]#
Bases:
Client
Steamship Python Client.
- embed_and_search(query: str, docs: List[str], plugin_instance: str, k: int = 1) QueryResults [source]#
- static temporary_workspace(**kwargs) Generator[Steamship, None, None] [source]#
Create a client rooted in a temporary workspace that will be deleted after use.
- static use(package_handle: str, instance_handle: str | None = None, config: Dict[str, Any] | None = None, version: str | None = None, fetch_if_exists: bool = True, workspace_handle: str | None = None, wait_for_init: bool = True, **kwargs) PackageInstance [source]#
Creates/loads an instance of package package_handle.
The instance is named instance_handle and located in the Workspace named instance_handle. If no instance_handle is provided, the default is package_handle.
For example, one may write the following to always get back the same package instance, no matter how many times you run it, scoped into its own workspace:
`python instance = Steamship.use('package-handle', 'instance-handle') `
One may also write:
`python instance = Steamship.use('package-handle') # Instance will also be named `package-handle` `
If you wish to override the usage of a workspace named instance_handle, you can provide the workspace_handle parameter.
- static use_plugin(plugin_handle: str, instance_handle: str | None = None, config: Dict[str, Any] | None = None, version: str | None = None, fetch_if_exists: bool = True, workspace_handle: str | None = None, wait_for_init: bool = True, **kwargs) PluginInstance [source]#
Creates/loads an instance of plugin plugin_handle.
The instance is named instance_handle and located in the Workspace named instance_handle. If no instance_handle is provided, the default is plugin_handle.
For example, one may write the following to always get back the same plugin instance, no matter how many times you run it, scoped into its own workspace:
`python instance = Steamship.use_plugin('plugin-handle', 'instance-handle') `
One may also write:
`python instance = Steamship.use('plugin-handle') # Instance will also be named `plugin-handle` `