steamship.data package#

Subpackages#

Submodules#

steamship.data.block module#

class steamship.data.block.Block(*, client: steamship.base.client.Client = None, id: str = None, fileId: str = None, text: str = None, tags: Optional[List[steamship.data.tags.tag.Tag]] = [])[source]#

Bases: steamship.base.model.CamelModel

class CreateRequest(*, id: str = None, fileId: str = None, text: str = None, tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]] = [])[source]#

Bases: steamship.base.request.Request

file_id: str#
id: str#
tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]]#
text: str#
class ListRequest(*, fileId: str = None)[source]#

Bases: steamship.base.request.Request

file_id: str#
class ListResponse(*, blocks: List[Block] = [])[source]#

Bases: steamship.base.response.Response

blocks: List[steamship.data.block.Block]#
client: steamship.base.client.Client#
static create(client: steamship.base.client.Client, file_id: Optional[str] = None, text: Optional[str] = None, tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]] = None) steamship.data.block.Block[source]#
delete() steamship.data.block.Block[source]#
file_id: str#
static get(client: steamship.base.client.Client, _id: Optional[str] = None) steamship.data.block.Block[source]#
id: str#
index(embedding_plugin_instance: Optional[Any] = None)[source]#

Index this block.

static query(client: steamship.base.client.Client, tag_filter_query: str) steamship.data.block.BlockQueryResponse[source]#
tags: Optional[List[steamship.data.tags.tag.Tag]]#
text: str#
class steamship.data.block.BlockQueryRequest(*, tagFilterQuery: str)[source]#

Bases: steamship.base.request.Request

tag_filter_query: str#
class steamship.data.block.BlockQueryResponse(*, blocks: List[steamship.data.block.Block])[source]#

Bases: steamship.base.response.Response

blocks: List[steamship.data.block.Block]#

steamship.data.embeddings module#

class steamship.data.embeddings.DeleteSnapshotsRequest(*, snapshotId: str = None)[source]#

Bases: steamship.base.request.Request

snapshot_id: str#
class steamship.data.embeddings.DeleteSnapshotsResponse(*, snapshotId: str = None)[source]#

Bases: steamship.base.response.Response

snapshot_id: str#
class steamship.data.embeddings.EmbedAndSearchRequest(*, query: str, docs: List[str], pluginInstance: str, k: int = 1)[source]#

Bases: steamship.base.request.Request

docs: List[str]#
k: int#
plugin_instance: str#
query: str#
class steamship.data.embeddings.EmbeddedItem(*, id: str = None, indexId: str = None, fileId: str = None, blockId: str = None, tagId: str = None, value: str = None, externalId: str = None, externalType: str = None, metadata: Any = None, embedding: List[float] = None)[source]#

Bases: steamship.base.model.CamelModel

block_id: str#
clone_for_insert() steamship.data.embeddings.EmbeddedItem[source]#

Produces a clone with a string representation of the metadata

embedding: List[float]#
external_id: str#
external_type: str#
file_id: str#
id: str#
index_id: str#
metadata: Any#
tag_id: str#
value: str#
class steamship.data.embeddings.EmbeddingIndex(*, client: steamship.base.client.Client = None, id: str = None, handle: str = None, name: str = None, plugin: str = None, externalId: str = None, externalType: str = None, metadata: str = None)[source]#

Bases: steamship.base.model.CamelModel

A persistent, read-optimized index over embeddings.

client: steamship.base.client.Client#
static create(client: steamship.base.client.Client, handle: Optional[str] = None, name: Optional[str] = None, embedder_plugin_instance_handle: Optional[str] = None, fetch_if_exists: bool = True, external_id: Optional[str] = None, external_type: Optional[str] = None, metadata: Optional[Any] = None) steamship.data.embeddings.EmbeddingIndex[source]#
create_snapshot() steamship.data.embeddings.IndexSnapshotResponse[source]#
delete() steamship.data.embeddings.EmbeddingIndex[source]#
delete_snapshot(snapshot_id: str) steamship.data.embeddings.DeleteSnapshotsResponse[source]#
embed() steamship.data.embeddings.Task[IndexEmbedResponse][source]#
external_id: str#
external_type: str#
handle: str#
id: str#
insert(value: str, external_id: Optional[str] = None, external_type: Optional[str] = None, metadata: Optional[Union[int, float, bool, str, List, Dict]] = None, reindex: bool = True) steamship.data.embeddings.IndexInsertResponse[source]#
insert_file(file_id: str, block_type: Optional[str] = None, external_id: Optional[str] = None, external_type: Optional[str] = None, metadata: Optional[Union[int, float, bool, str, List, Dict]] = None, reindex: bool = True) steamship.data.embeddings.IndexInsertResponse[source]#
insert_many(items: List[Union[steamship.data.embeddings.EmbeddedItem, str]], reindex: bool = True) steamship.data.embeddings.IndexInsertResponse[source]#
list_items(file_id: Optional[str] = None, block_id: Optional[str] = None, span_id: Optional[str] = None) steamship.data.embeddings.ListItemsResponse[source]#
list_snapshots() steamship.data.embeddings.ListSnapshotsResponse[source]#
metadata: str#
name: str#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#
plugin: str#
search(query: Union[str, List[str]], k: int = 1, include_metadata: bool = False) steamship.data.embeddings.Task[QueryResults][source]#
class steamship.data.embeddings.IndexCreateRequest(*, handle: str = None, name: str = None, pluginInstance: str = None, fetchIfExists: bool = True, externalId: str = None, externalType: str = None, metadata: Any = None)[source]#

Bases: steamship.base.request.Request

external_id: str#
external_type: str#
fetch_if_exists: bool#
handle: str#
metadata: Any#
name: str#
plugin_instance: str#
class steamship.data.embeddings.IndexEmbedRequest(*, id: str)[source]#

Bases: steamship.base.request.Request

id: str#
class steamship.data.embeddings.IndexEmbedResponse(*, id: Optional[str] = None)[source]#

Bases: steamship.base.response.Response

id: Optional[str]#
class steamship.data.embeddings.IndexInsertRequest(*, indexId: str, items: List[steamship.data.embeddings.EmbeddedItem] = None, value: str = None, fileId: str = None, blockType: str = None, externalId: str = None, externalType: str = None, metadata: Any = None, reindex: bool = True)[source]#

Bases: steamship.base.request.Request

block_type: str#
external_id: str#
external_type: str#
file_id: str#
index_id: str#
items: List[steamship.data.embeddings.EmbeddedItem]#
metadata: Any#
reindex: bool#
value: str#
class steamship.data.embeddings.IndexInsertResponse(*, itemIds: List[steamship.data.embeddings.IndexItemId] = None)[source]#

Bases: steamship.base.response.Response

item_ids: List[steamship.data.embeddings.IndexItemId]#
class steamship.data.embeddings.IndexItemId(*, indexId: str = None, id: str = None)[source]#

Bases: steamship.base.model.CamelModel

id: str#
index_id: str#
class steamship.data.embeddings.IndexSearchRequest(*, id: str, query: str = None, queries: List[str] = None, k: int = 1, includeMetadata: bool = False)[source]#

Bases: steamship.base.request.Request

id: str#
include_metadata: bool#
k: int#
queries: List[str]#
query: str#
class steamship.data.embeddings.IndexSnapshotRequest(*, indexId: str, windowSize: int = None)[source]#

Bases: steamship.base.request.Request

index_id: str#
window_size: int#
class steamship.data.embeddings.IndexSnapshotResponse(*, id: Optional[str] = None, snapshotId: str)[source]#

Bases: steamship.base.response.Response

id: Optional[str]#
snapshot_id: str#
class steamship.data.embeddings.ListItemsRequest(*, id: str = None, fileId: str = None, blockId: str = None, spanId: str = None)[source]#

Bases: steamship.base.request.Request

block_id: str#
file_id: str#
id: str#
span_id: str#
class steamship.data.embeddings.ListItemsResponse(*, items: List[steamship.data.embeddings.EmbeddedItem])[source]#

Bases: steamship.base.response.Response

items: List[steamship.data.embeddings.EmbeddedItem]#
class steamship.data.embeddings.ListSnapshotsRequest(*, id: str = None)[source]#

Bases: steamship.base.request.Request

id: str#
class steamship.data.embeddings.ListSnapshotsResponse(*, snapshots: List[steamship.data.embeddings.IndexSnapshotResponse])[source]#

Bases: steamship.base.response.Response

snapshots: List[steamship.data.embeddings.IndexSnapshotResponse]#
class steamship.data.embeddings.QueryResult(*, value: Optional[steamship.data.search.Hit] = None, score: Optional[float] = None, index: Optional[int] = None, id: Optional[str] = None)[source]#

Bases: steamship.base.model.CamelModel

id: Optional[str]#
index: Optional[int]#
score: Optional[float]#
value: Optional[steamship.data.search.Hit]#
class steamship.data.embeddings.QueryResults(*, items: List[steamship.data.embeddings.QueryResult] = None)[source]#

Bases: steamship.base.request.Request

items: List[steamship.data.embeddings.QueryResult]#

steamship.data.file module#

class steamship.data.file.File(*, client: steamship.base.client.Client = None, id: str = None, handle: str = None, mimeType: str = None, workspaceId: str = None, blocks: List[steamship.data.block.Block] = [], tags: List[steamship.data.tags.tag.Tag] = [], filename: str = None)[source]#

Bases: steamship.base.model.CamelModel

A file.

class CreateRequest(*, value: str = None, data: str = None, id: str = None, url: str = None, handle: str = None, filename: str = None, type: steamship.data.file.FileUploadType = None, mimeType: str = None, blocks: Optional[List[steamship.data.block.Block.CreateRequest]] = [], tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]] = [], pluginInstance: str = None)[source]#

Bases: steamship.base.request.Request

blocks: Optional[List[steamship.data.block.Block.CreateRequest]]#
data: str#
filename: str#
handle: str#
id: str#
mime_type: str#
plugin_instance: str#
tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]]#
type: steamship.data.file.FileUploadType#
url: str#
value: str#
class CreateResponse(data: Any = None, string: str = None, _bytes: Union[bytes, io.BytesIO] = None, json: io.BytesIO = None, mime_type: str = None)[source]#

Bases: steamship.base.response.Response

data_: Any#
mime_type: str#
classmethod parse_obj(obj: Any) steamship.base.response.Response[source]#
blockify(plugin_instance: Optional[str] = None, wait_on_tasks: Optional[List[steamship.base.tasks.Task]] = None) steamship.base.tasks.Task[source]#
blocks: List[steamship.data.block.Block]#
client: steamship.base.client.Client#
static create(client: steamship.base.client.Client, content: Optional[Union[str, bytes]] = None, mime_type: Optional[str] = None, handle: Optional[str] = None, blocks: Optional[List[steamship.data.block.Block.CreateRequest]] = None, tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]] = None) steamship.data.file.File[source]#
static create_with_plugin(client: steamship.base.client.Client, plugin_instance: str, url: Optional[str] = None, mime_type: Optional[str] = None) steamship.data.file.Task[File][source]#
delete() steamship.data.file.File[source]#
filename: str#
static get(client: steamship.base.client.Client, _id: Optional[str] = None, handle: Optional[str] = None) steamship.data.file.File[source]#
handle: str#
id: str#
index(plugin_instance: Optional[Any] = None) steamship.data.embeddings.EmbeddingIndex[source]#

Index every block in the file.

TODO(ted): Enable indexing the results of a tag query. TODO(ted): It’s hard to load the EmbeddingIndexPluginInstance with just a handle because of the chain of things that need to be created to it to function.

static list(client: steamship.base.client.Client) steamship.data.file.ListFileResponse[source]#
mime_type: str#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#
static query(client: steamship.base.client.Client, tag_filter_query: str) steamship.data.file.FileQueryResponse[source]#
raw()[source]#
refresh() steamship.data.file.File[source]#
tag(plugin_instance: str = None, wait_on_tasks: List[Task] = None) Task[TagResponse][source]#
tags: List[steamship.data.tags.tag.Tag]#
workspace_id: str#
class steamship.data.file.FileClearResponse(*, id: str)[source]#

Bases: steamship.base.response.Response

id: str#
class steamship.data.file.FileQueryRequest(*, tagFilterQuery: str)[source]#

Bases: steamship.base.request.Request

tag_filter_query: str#
class steamship.data.file.FileQueryResponse(*, files: List[steamship.data.file.File])[source]#

Bases: steamship.base.response.Response

files: List[steamship.data.file.File]#
class steamship.data.file.FileUploadType(value)[source]#

Bases: str, enum.Enum

An enumeration.

BLOCKS = 'blocks'#
FILE = 'file'#
FILE_IMPORTER = 'fileImporter'#
VALUE = 'value'#
class steamship.data.file.ListFileRequest[source]#

Bases: steamship.base.request.Request

class steamship.data.file.ListFileResponse(*, files: List[File])[source]#

Bases: steamship.base.response.Response

files: List[steamship.data.file.File]#

steamship.data.search module#

class steamship.data.search.Hit(*, id: str = None, index: int = None, indexSource: str = None, value: str = None, score: float = None, externalId: str = None, externalType: str = None, metadata: Any = None, query: str = None)[source]#

Bases: steamship.base.model.CamelModel

external_id: str#
external_type: str#
id: str#
index: int#
index_source: str#
metadata: Any#
query: str#
score: float#
value: str#

steamship.data.user module#

class steamship.data.user.User(*, client: steamship.base.client.Client = None, id: str = None, handle: str = None)[source]#

Bases: steamship.base.model.CamelModel

client: steamship.base.client.Client#
static current(client: steamship.base.client.Client) steamship.data.user.User[source]#
handle: str#
id: str#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#

steamship.data.workspace module#

class steamship.data.workspace.ListWorkspacesRequest[source]#

Bases: steamship.base.request.Request

class steamship.data.workspace.ListWorkspacesResponse(*, workspaces: List[Workspace])[source]#

Bases: steamship.base.response.Response

workspaces: List[steamship.data.workspace.Workspace]#
class steamship.data.workspace.SignedUrl[source]#

Bases: object

class Bucket(value)[source]#

Bases: str, enum.Enum

An enumeration.

APP_DATA = 'appData'#
EXPORTS = 'exports'#
IMPORTS = 'imports'#
PLUGIN_DATA = 'pluginData'#
USER_DATA = 'userData'#
class Operation(value)[source]#

Bases: str, enum.Enum

An enumeration.

READ = 'Read'#
WRITE = 'Write'#
class Request(*, bucket: SignedUrl.Bucket, filepath: str, operation: SignedUrl.Operation, expiresInMinutes: int = None)[source]#

Bases: steamship.base.request.Request

bucket: steamship.data.workspace.SignedUrl.Bucket#
expires_in_minutes: int#
filepath: str#
operation: steamship.data.workspace.SignedUrl.Operation#
class Response(*, bucket: str = None, filepath: str = None, operation: str = None, expiresInMinutes: int = None, signedUrl: str = None)[source]#

Bases: steamship.base.response.Response

bucket: str#
expires_in_minutes: int#
filepath: str#
operation: str#
signed_url: str#
class steamship.data.workspace.Workspace(*, client: steamship.base.client.Client = None, id: str = None, handle: str = None)[source]#

Bases: steamship.base.model.CamelModel

class CreateRequest(*, id: Optional[str] = None, handle: Optional[str] = None, fetchIfExists: Optional[bool] = None, externalId: Optional[str] = None, externalType: Optional[str] = None, metadata: Optional[str] = None)[source]#

Bases: steamship.base.request.Request

external_id: Optional[str]#
external_type: Optional[str]#
fetch_if_exists: Optional[bool]#
handle: Optional[str]#
id: Optional[str]#
metadata: Optional[str]#
client: steamship.base.client.Client#
static create(client: steamship.base.client.Client, handle: Optional[str] = None, external_id: Optional[str] = None, external_type: Optional[str] = None, metadata: Optional[Any] = None, fetch_if_exists: bool = True) steamship.data.workspace.Workspace[source]#
create_signed_url(request: steamship.data.workspace.SignedUrl.Request) steamship.data.workspace.SignedUrl.Response[source]#
delete() steamship.data.workspace.Workspace[source]#
static get(client: steamship.base.client.Client, id_: Optional[str] = None, handle: Optional[str] = None, fetch_if_exists: Optional[bool] = None) steamship.data.workspace.Workspace[source]#
handle: str#
id: str#
static list(client: steamship.base.client.Client, t: Optional[str] = None) steamship.data.workspace.ListWorkspacesResponse[source]#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#

Module contents#

class steamship.data.Block(*, client: steamship.base.client.Client = None, id: str = None, fileId: str = None, text: str = None, tags: Optional[List[steamship.data.tags.tag.Tag]] = [])[source]#

Bases: steamship.base.model.CamelModel

class CreateRequest(*, id: str = None, fileId: str = None, text: str = None, tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]] = [])[source]#

Bases: steamship.base.request.Request

file_id: str#
id: str#
tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]]#
text: str#
class ListRequest(*, fileId: str = None)[source]#

Bases: steamship.base.request.Request

file_id: str#
class ListResponse(*, blocks: List[Block] = [])[source]#

Bases: steamship.base.response.Response

blocks: List[steamship.data.block.Block]#
client: steamship.base.client.Client#
static create(client: steamship.base.client.Client, file_id: Optional[str] = None, text: Optional[str] = None, tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]] = None) steamship.data.block.Block[source]#
delete() steamship.data.block.Block[source]#
file_id: str#
static get(client: steamship.base.client.Client, _id: Optional[str] = None) steamship.data.block.Block[source]#
id: str#
index(embedding_plugin_instance: Optional[Any] = None)[source]#

Index this block.

static query(client: steamship.base.client.Client, tag_filter_query: str) steamship.data.block.BlockQueryResponse[source]#
tags: Optional[List[steamship.data.tags.tag.Tag]]#
text: str#
class steamship.data.DocTag(value)[source]#

Bases: str, enum.Enum

A set of name constants for for Tags with a kind of TagKind.doc; appropriate for HTML and Markdown ideas.

ARTICLE = 'article'#
BLOCK_CODE = 'block-code'#
BLOCK_QUOTE = 'block-quote'#
CAPTION = 'caption'#
DIV = 'div'#
DOCUMENT = 'document'#
EMPHASIZED = 'emphasized'#
FOOTER = 'footer'#
H1 = 'h1'#
H2 = 'h2'#
H3 = 'h3'#
H4 = 'h4'#
H5 = 'h5'#
HEADER = 'header'#
IMAGE = 'image'#
LINE = 'line'#
LIST_ITEM = 'list-item'#
MAIN = 'main'#
ORDERED_LIST = 'ordered-list'#
PAGE = 'page'#
PARAGRAPH = 'paragraph'#
PRE = 'pre'#
REGION = 'region'#
SENTENCE = 'sentence'#
SPAN = 'span'#
STRONG = 'strong'#
SUBTITLE = 'subtitle'#
TELETYPE = 'teletype'#
TITLE = 'title'#
TOKEN = 'token'#
UNDERLINED = 'underlined'#
UNKNOWN = 'unknown'#
UNORDERED_LIST = 'unordered-list'#
static from_html_tag(tagname: Optional[str]) Optional[steamship.data.tags.tag_constants.DocTag][source]#
class steamship.data.EmbeddingIndex(*, client: steamship.base.client.Client = None, id: str = None, handle: str = None, name: str = None, plugin: str = None, externalId: str = None, externalType: str = None, metadata: str = None)[source]#

Bases: steamship.base.model.CamelModel

A persistent, read-optimized index over embeddings.

client: steamship.base.client.Client#
static create(client: steamship.base.client.Client, handle: Optional[str] = None, name: Optional[str] = None, embedder_plugin_instance_handle: Optional[str] = None, fetch_if_exists: bool = True, external_id: Optional[str] = None, external_type: Optional[str] = None, metadata: Optional[Any] = None) steamship.data.embeddings.EmbeddingIndex[source]#
create_snapshot() steamship.data.embeddings.IndexSnapshotResponse[source]#
delete() steamship.data.embeddings.EmbeddingIndex[source]#
delete_snapshot(snapshot_id: str) steamship.data.embeddings.DeleteSnapshotsResponse[source]#
embed() steamship.data.embeddings.Task[IndexEmbedResponse][source]#
external_id: str#
external_type: str#
handle: str#
id: str#
insert(value: str, external_id: Optional[str] = None, external_type: Optional[str] = None, metadata: Optional[Union[int, float, bool, str, List, Dict]] = None, reindex: bool = True) steamship.data.embeddings.IndexInsertResponse[source]#
insert_file(file_id: str, block_type: Optional[str] = None, external_id: Optional[str] = None, external_type: Optional[str] = None, metadata: Optional[Union[int, float, bool, str, List, Dict]] = None, reindex: bool = True) steamship.data.embeddings.IndexInsertResponse[source]#
insert_many(items: List[Union[steamship.data.embeddings.EmbeddedItem, str]], reindex: bool = True) steamship.data.embeddings.IndexInsertResponse[source]#
list_items(file_id: Optional[str] = None, block_id: Optional[str] = None, span_id: Optional[str] = None) steamship.data.embeddings.ListItemsResponse[source]#
list_snapshots() steamship.data.embeddings.ListSnapshotsResponse[source]#
metadata: str#
name: str#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#
plugin: str#
search(query: Union[str, List[str]], k: int = 1, include_metadata: bool = False) steamship.data.embeddings.Task[QueryResults][source]#
class steamship.data.EmotionTag(value)[source]#

Bases: str, enum.Enum

A set of name constants for Tags with a kind of TagKind.emotion.

ANGER = 'anger'#
CONCERN = 'concern'#
FEAR = 'fear'#
HAPPINESS = 'happiness'#
HUMOR = 'humor'#
JOY = 'joy'#
LOVE = 'love'#
NEGATIVE = 'negative'#
NEUTRAL = 'neutral'#
POSITIVE = 'positive'#
SADNESS = 'sadness'#
SCORE = 'score'#
SERIOUSNESS = 'seriousness'#
SURPRISE = 'surprise'#
class steamship.data.EntityTag(value)[source]#

Bases: str, enum.Enum

A set of name constants for Tags with a kind of TagKind.entity.

DATE = 'date'#
FACILITY = 'facility'#
GEO_POLITICAL_ENTITY = 'geo-political-entity'#
LOCATION = 'location'#
MONEY = 'money'#
ORGANIZATION = 'organization'#
PERCENT = 'percent'#
PERSON = 'person'#
PRODUCT = 'product'#
TIME = 'time'#
class steamship.data.File(*, client: steamship.base.client.Client = None, id: str = None, handle: str = None, mimeType: str = None, workspaceId: str = None, blocks: List[steamship.data.block.Block] = [], tags: List[steamship.data.tags.tag.Tag] = [], filename: str = None)[source]#

Bases: steamship.base.model.CamelModel

A file.

class CreateRequest(*, value: str = None, data: str = None, id: str = None, url: str = None, handle: str = None, filename: str = None, type: steamship.data.file.FileUploadType = None, mimeType: str = None, blocks: Optional[List[steamship.data.block.Block.CreateRequest]] = [], tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]] = [], pluginInstance: str = None)[source]#

Bases: steamship.base.request.Request

blocks: Optional[List[steamship.data.block.Block.CreateRequest]]#
data: str#
filename: str#
handle: str#
id: str#
mime_type: str#
plugin_instance: str#
tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]]#
type: steamship.data.file.FileUploadType#
url: str#
value: str#
class CreateResponse(data: Any = None, string: str = None, _bytes: Union[bytes, io.BytesIO] = None, json: io.BytesIO = None, mime_type: str = None)[source]#

Bases: steamship.base.response.Response

data_: Any#
mime_type: str#
classmethod parse_obj(obj: Any) steamship.base.response.Response[source]#
blockify(plugin_instance: Optional[str] = None, wait_on_tasks: Optional[List[steamship.base.tasks.Task]] = None) steamship.base.tasks.Task[source]#
blocks: List[steamship.data.block.Block]#
client: steamship.base.client.Client#
static create(client: steamship.base.client.Client, content: Optional[Union[str, bytes]] = None, mime_type: Optional[str] = None, handle: Optional[str] = None, blocks: Optional[List[steamship.data.block.Block.CreateRequest]] = None, tags: Optional[List[steamship.data.tags.tag.Tag.CreateRequest]] = None) steamship.data.file.File[source]#
static create_with_plugin(client: steamship.base.client.Client, plugin_instance: str, url: Optional[str] = None, mime_type: Optional[str] = None) steamship.data.file.Task[File][source]#
delete() steamship.data.file.File[source]#
filename: str#
static get(client: steamship.base.client.Client, _id: Optional[str] = None, handle: Optional[str] = None) steamship.data.file.File[source]#
handle: str#
id: str#
index(plugin_instance: Optional[Any] = None) steamship.data.embeddings.EmbeddingIndex[source]#

Index every block in the file.

TODO(ted): Enable indexing the results of a tag query. TODO(ted): It’s hard to load the EmbeddingIndexPluginInstance with just a handle because of the chain of things that need to be created to it to function.

static list(client: steamship.base.client.Client) steamship.data.file.ListFileResponse[source]#
mime_type: str#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#
static query(client: steamship.base.client.Client, tag_filter_query: str) steamship.data.file.FileQueryResponse[source]#
raw()[source]#
refresh() steamship.data.file.File[source]#
tag(plugin_instance: str = None, wait_on_tasks: List[Task] = None) Task[TagResponse][source]#
tags: List[steamship.data.tags.tag.Tag]#
workspace_id: str#
class steamship.data.GenerationTag(value)[source]#

Bases: str, enum.Enum

A set of name constants for Tags with a kind of TagKind.generation.

PROMPT_COMPLETION = 'prompt-completion'#
SUMMARY = 'summary'#
class steamship.data.IntentTag(value)[source]#

Bases: str, enum.Enum

A set of name constants for Tags with a kind of TagKind.intent.

ARE_YOU_THERE = 'are-you-there'#
COMPLAINT = 'complaint'#
EXPLANATION = 'explanation'#
PRAISE = 'praise'#
QUESTION = 'question'#
REQUEST = 'request'#
REVISITING_TOPIC = 'revisiting-topic'#
SALUTATION = 'salutation'#
SCHEDULING_REQUEST = 'scheduling-request'#
class steamship.data.Package(*, client: steamship.base.client.Client = None, id: str = None, handle: str = None)[source]#

Bases: pydantic.main.BaseModel

client: steamship.base.client.Client#
static create(client: steamship.base.client.Client, handle: Optional[str] = None) steamship.data.package.package.Package[source]#
static get(client: steamship.base.client.Client, handle: str) steamship.data.package.package.Package[source]#
handle: str#
id: str#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#
class steamship.data.PackageInstance(*, client: steamship.base.client.Client = None, id: str = None, handle: str = None, packageId: str = None, packageHandle: str = None, userHandle: str = None, packageVersionId: str = None, userId: str = None, invocationURL: str = None, config: Dict[str, Any] = None, workspaceId: str = None, workspaceHandle: str = None)[source]#

Bases: steamship.base.model.CamelModel

client: steamship.base.client.Client#
config: Dict[str, Any]#
static create(client: steamship.base.client.Client, package_id: Optional[str] = None, package_handle: Optional[str] = None, package_version_id: Optional[str] = None, package_version_handle: Optional[str] = None, handle: Optional[str] = None, fetch_if_exists: Optional[bool] = None, config: Optional[Dict[str, Any]] = None) steamship.data.package.package_instance.PackageInstance[source]#
delete() steamship.data.package.package_instance.PackageInstance[source]#
full_url_for(path: str)[source]#
static get(client: steamship.base.client.Client, handle: str) steamship.data.package.package_instance.PackageInstance[source]#
handle: str#
id: str#
invocation_url: str#
invoke(path: str, verb: steamship.utils.url.Verb = Verb.POST, **kwargs)[source]#
load_missing_workspace_handle()[source]#
package_handle: str#
package_id: str#
package_version_id: str#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#
user_handle: str#
user_id: str#
workspace_handle: str#
workspace_id: str#
class steamship.data.PackageVersion(*, client: steamship.base.client.Client = None, id: str = None, packageId: str = None, handle: str = None, configTemplate: Dict[str, Any] = None)[source]#

Bases: steamship.base.model.CamelModel

client: steamship.base.client.Client#
config_template: Dict[str, Any]#
static create(client: steamship.base.client.Client, package_id: Optional[str] = None, handle: Optional[str] = None, filename: Optional[str] = None, filebytes: Optional[bytes] = None, config_template: Optional[Dict[str, Any]] = None, hosting_handler: Optional[str] = None) steamship.data.package.package_version.PackageVersion[source]#
handle: str#
id: str#
package_id: str#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#
class steamship.data.Plugin(*, client: steamship.base.client.Client = None, id: str = None, type: str = None, transport: str = None, isPublic: bool = None, trainingPlatform: Optional[steamship.data.plugin.hosting.HostingType] = None, handle: str = None, description: str = None, metadata: str = None)[source]#

Bases: steamship.base.model.CamelModel

client: steamship.base.client.Client#
static create(client: steamship.base.client.Client, description: str, type_: str, transport: str, is_public: bool, handle: Optional[str] = None, training_platform: Optional[steamship.data.plugin.hosting.HostingType] = None, metadata: Optional[Union[str, Dict, List]] = None) steamship.data.plugin.plugin.Plugin[source]#
description: str#
static get(client: steamship.base.client.Client, handle: str)[source]#
handle: str#
id: str#
is_public: bool#
static list(client: steamship.base.client.Client, t: Optional[str] = None) steamship.data.plugin.plugin.ListPluginsResponse[source]#
metadata: str#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#
training_platform: Optional[steamship.data.plugin.hosting.HostingType]#
transport: str#
type: str#
class steamship.data.PluginInstance(*, client: steamship.base.client.Client = None, id: str = None, handle: str = None, pluginId: str = None, pluginVersionId: str = None, workspaceId: Optional[str] = None, userId: str = None, config: Dict[str, Any] = None, hostingType: Optional[steamship.data.plugin.hosting.HostingType] = None, hostingCpu: Optional[steamship.data.plugin.hosting.HostingCpu] = None, hostingMemory: Optional[steamship.data.plugin.hosting.HostingMemory] = None, hostingTimeout: Optional[steamship.data.plugin.hosting.HostingTimeout] = None, hostingEnvironment: Optional[steamship.data.plugin.hosting.HostingEnvironment] = None)[source]#

Bases: steamship.base.model.CamelModel

client: steamship.base.client.Client#
config: Dict[str, Any]#
static create(client: steamship.base.client.Client, plugin_id: Optional[str] = None, plugin_handle: Optional[str] = None, plugin_version_id: Optional[str] = None, plugin_version_handle: Optional[str] = None, handle: Optional[str] = None, fetch_if_exists: bool = True, config: Optional[Dict[str, Any]] = None) steamship.data.plugin.plugin_instance.PluginInstance[source]#

Create a plugin instance

When handle is empty the engine will automatically assign one fetch_if_exists controls whether we want to re-use an existing plugin instance or not.

delete() steamship.data.plugin.plugin_instance.PluginInstance[source]#
static get(client: steamship.base.client.Client, handle: str) steamship.data.plugin.plugin_instance.PluginInstance[source]#
get_training_parameters(training_request: steamship.plugin.inputs.training_parameter_plugin_input.TrainingParameterPluginInput) steamship.plugin.outputs.training_parameter_plugin_output.TrainingParameterPluginOutput[source]#
handle: str#
hosting_cpu: Optional[steamship.data.plugin.hosting.HostingCpu]#
hosting_environment: Optional[steamship.data.plugin.hosting.HostingEnvironment]#
hosting_memory: Optional[steamship.data.plugin.hosting.HostingMemory]#
hosting_timeout: Optional[steamship.data.plugin.hosting.HostingTimeout]#
hosting_type: Optional[steamship.data.plugin.hosting.HostingType]#
id: str#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#
plugin_id: str#
plugin_version_id: str#
tag(doc: Union[str, steamship.data.file.File]) steamship.data.plugin.plugin_instance.Task[TagResponse][source]#
train(training_request: steamship.plugin.inputs.training_parameter_plugin_input.TrainingParameterPluginInput) steamship.data.plugin.plugin_instance.Task[TrainPluginOutput][source]#
user_id: str#
workspace_id: Optional[str]#
class steamship.data.PluginVersion(*, client: steamship.base.client.Client = None, id: str = None, pluginId: str = None, handle: str = None, hostingMemory: Optional[steamship.data.plugin.hosting.HostingMemory] = None, hostingTimeout: Optional[steamship.data.plugin.hosting.HostingTimeout] = None, hostingHandler: str = None, isPublic: bool = None, isDefault: bool = None, configTemplate: Dict[str, Any] = None)[source]#

Bases: steamship.base.model.CamelModel

client: steamship.base.client.Client#
config_template: Dict[str, Any]#
static create(client: steamship.base.client.Client, handle: str, plugin_id: Optional[str] = None, filename: Optional[str] = None, filebytes: Optional[bytes] = None, hosting_memory: Optional[steamship.data.plugin.hosting.HostingMemory] = None, hosting_timeout: Optional[steamship.data.plugin.hosting.HostingTimeout] = None, hosting_handler: Optional[str] = None, is_public: Optional[bool] = None, is_default: Optional[bool] = None, config_template: Optional[Dict[str, Any]] = None) steamship.data.plugin.plugin_version.Task[PluginVersion][source]#
handle: str#
hosting_handler: str#
hosting_memory: Optional[steamship.data.plugin.hosting.HostingMemory]#
hosting_timeout: Optional[steamship.data.plugin.hosting.HostingTimeout]#
id: str#
is_default: bool#
is_public: bool#
static list(client: steamship.base.client.Client, plugin_id: Optional[str] = None, handle: Optional[str] = None, public: bool = True) steamship.data.plugin.plugin_version.ListPluginVersionsResponse[source]#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#
plugin_id: str#
class steamship.data.SentimentTag(value)[source]#

Bases: str, enum.Enum

A set of name constants for Tags with a kind of TagKind.sentiment.

NEGATIVE = 'negative'#
NEUTRAL = 'neutral'#
POSITIVE = 'positive'#
SCORE = 'score'#
class steamship.data.Tag(*, client: steamship.base.client.Client = None, id: str = None, fileId: str = None, blockId: Optional[str] = None, kind: str = None, name: Optional[str] = None, value: Optional[Dict[str, Any]] = None, startIdx: Optional[int] = None, endIdx: Optional[int] = None, text: Optional[str] = None)[source]#

Bases: steamship.base.model.CamelModel

class CreateRequest(*, id: str = None, fileId: str = None, blockId: str = None, kind: str = None, name: str = None, startIdx: int = None, endIdx: int = None, value: Dict[str, Any] = None)[source]#

Bases: steamship.base.request.Request

Request to create a new Tag.

block_id: str#
end_idx: int#
file_id: str#
id: str#
kind: str#
name: str#
start_idx: int#
value: Dict[str, Any]#
class DeleteRequest(*, id: str = None, fileId: str = None, blockId: str = None)[source]#

Bases: steamship.base.request.Request

block_id: str#
file_id: str#
id: str#
class ListRequest(*, fileId: str = None, blockId: str = None)[source]#

Bases: steamship.base.request.Request

block_id: str#
file_id: str#
class ListResponse(*, tags: List[Tag] = None)[source]#

Bases: steamship.base.response.Response

tags: List[steamship.data.tags.tag.Tag]#
block_id: Optional[str]#
client: steamship.base.client.Client#
static create(client: steamship.base.client.Client, file_id: Optional[str] = None, block_id: Optional[str] = None, kind: Optional[str] = None, name: Optional[str] = None, start_idx: Optional[int] = None, end_idx: Optional[int] = None, value: Optional[Dict[str, Any]] = None) steamship.data.tags.tag.Tag[source]#
delete() steamship.data.tags.tag.Tag[source]#
end_idx: Optional[int]#
file_id: str#
id: str#
index(plugin_instance: Optional[Any] = None)[source]#

Index this tag.

kind: str#
name: Optional[str]#
static query(client: steamship.base.client.Client, tag_filter_query: str) steamship.data.tags.tag.TagQueryResponse[source]#
start_idx: Optional[int]#
text: Optional[str]#
value: Optional[Dict[str, Any]]#
class steamship.data.TagKind(value)[source]#

Bases: str, enum.Enum

A set of kind constants for Tags.

These define broad categories of tags. Suggested name values for each category are found in separate enums. For example: kind=TagKind.DOCUMENT, name=DocumentTag.H1

DEPENDENCY = 'dependency'#
DOCUMENT = 'document'#
EMBEDDING = 'embedding'#
EMOTION = 'emotion'#
ENTITY = 'entity'#
GENERATION = 'generation'#
INTENT = 'intent'#
PART_OF_SPEECH = 'part-of-speech'#
SENTIMENT = 'sentiment'#
TOKEN = 'token'#
class steamship.data.TagValue(value)[source]#

Bases: str, enum.Enum

A set of key constants for the value object within a tag..

BOOL_VALUE = 'bool-value'#
NUMBER_VALUE = 'number-value'#
SCORE = 'score'#
STRING_VALUE = 'string-value'#
VECTOR_VALUE = 'vector-value'#
class steamship.data.TokenTag(value)[source]#

Bases: str, enum.Enum

A set of name constants for Tags with a kind of TagKind.token; appropriate for parsing-level ideas.

ENTITY_IOB = 'entity-iob'#
ENTITY_TYPE = 'entity-type'#
HEAD = 'head'#
IS_ALPHA = 'is-alpha'#
IS_ASCII = 'is-ascii'#
IS_BRACKET = 'is-bracket'#
IS_CURRENCY = 'is-currency'#
IS_DIGIT = 'is-digit'#
IS_LEFT_PUNCT = 'is-left-punct'#
IS_OUT_OF_VOCABULARY = 'is-out-of-vocabulary'#
IS_PUNCT = 'is-punct'#
IS_QUOTE = 'is-quote'#
IS_RIGHT_PUNCT = 'is-right-punct'#
IS_SPACE = 'is-space'#
IS_STOPWORD = 'is-stopword'#
IS_TITLE = 'is-title'#
LANGUAGE = 'language'#
LEFT_EDGE = 'left-edge'#
LEMMA = 'lemma'#
LIKE_EMAIL = 'like-email'#
LIKE_NUM = 'like-num'#
LIKE_URL = 'like-url'#
NORMALIZED = 'normalized'#
PREFIX = 'prefix'#
RIGHT_EDGE = 'right-edge'#
SHAPE = 'shape'#
SUFFIX = 'suffix'#
TEXT_WITH_WHITESPACE = 'text-with-whitespace'#
WHITESPACE = 'whitespace'#
class steamship.data.Workspace(*, client: steamship.base.client.Client = None, id: str = None, handle: str = None)[source]#

Bases: steamship.base.model.CamelModel

class CreateRequest(*, id: Optional[str] = None, handle: Optional[str] = None, fetchIfExists: Optional[bool] = None, externalId: Optional[str] = None, externalType: Optional[str] = None, metadata: Optional[str] = None)[source]#

Bases: steamship.base.request.Request

external_id: Optional[str]#
external_type: Optional[str]#
fetch_if_exists: Optional[bool]#
handle: Optional[str]#
id: Optional[str]#
metadata: Optional[str]#
client: steamship.base.client.Client#
static create(client: steamship.base.client.Client, handle: Optional[str] = None, external_id: Optional[str] = None, external_type: Optional[str] = None, metadata: Optional[Any] = None, fetch_if_exists: bool = True) steamship.data.workspace.Workspace[source]#
create_signed_url(request: steamship.data.workspace.SignedUrl.Request) steamship.data.workspace.SignedUrl.Response[source]#
delete() steamship.data.workspace.Workspace[source]#
static get(client: steamship.base.client.Client, id_: Optional[str] = None, handle: Optional[str] = None, fetch_if_exists: Optional[bool] = None) steamship.data.workspace.Workspace[source]#
handle: str#
id: str#
static list(client: steamship.base.client.Client, t: Optional[str] = None) steamship.data.workspace.ListWorkspacesResponse[source]#
classmethod parse_obj(obj: Any) pydantic.main.BaseModel[source]#