steamship.data.tags package#

Submodules#

steamship.data.tags.tag module#

class steamship.data.tags.tag.EmbeddingTag(embedding: List[float | int] = None, start_idx: int | None = None, end_idx: int | None = None, value: Dict[str, Any] | None = None)[source]#

Bases: Tag

class steamship.data.tags.tag.EmotionTag(emotion: Emotion, start_idx: int | None = None, end_idx: int | None = None, value: Dict[str, Any] | None = None)[source]#

Bases: Tag

class Emotion(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

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.tags.tag.EntityTag(entity_name: str, entity_type: EntityType, start_idx: int | None = None, end_idx: int | None = None, value: Dict[str, Any] | None = None)[source]#

Bases: Tag

class EntityType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

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.tags.tag.IntentTag(intent: Intent, start_idx: int | None = None, end_idx: int | None = None, value: Dict[str, Any] | None = None)[source]#

Bases: Tag

class Intent(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

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.tags.tag.PromptCompletionTag(text: str = None, start_idx: int | None = None, end_idx: int | None = None, value: Dict[str, Any] | None = None)[source]#

Bases: Tag

class steamship.data.tags.tag.SentimentTag(sentiment: Sentiment, start_idx: int | None = None, end_idx: int | None = None, value: Dict[str, Any] | None = None)[source]#

Bases: Tag

class Sentiment(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

NEGATIVE = 'negative'#
NEUTRAL = 'neutral'#
POSITIVE = 'positive'#
SCORE = 'score'#
class steamship.data.tags.tag.SummaryTag(summary: str, start_idx: int | None = None, end_idx: int | None = None, value: Dict[str, Any] | None = None)[source]#

Bases: Tag

class steamship.data.tags.tag.Tag(*, client: Client = None, id: str = None, fileId: str = None, blockId: str | None = None, kind: TagKind | str = None, name: str | None = None, value: Dict[TagValueKey | str, Any] | None = None, startIdx: int | None = None, endIdx: int | None = None, text: str | None = None)[source]#

Bases: CamelModel

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

Bases: Request

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

Bases: Request

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

Bases: Response

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

Index this tag.

kind: TagKind | str#
name: str | None#
classmethod parse_obj(obj: Any) BaseModel[source]#
static query(client: Client, tag_filter_query: str) TagQueryResponse[source]#
start_idx: int | None#
text: str | None#
value: Dict[TagValueKey | str, Any] | None#
class steamship.data.tags.tag.TagQueryRequest(*, tagFilterQuery: str)[source]#

Bases: Request

tag_filter_query: str#
class steamship.data.tags.tag.TagQueryResponse(*, tags: List[Tag])[source]#

Bases: Response

tags: List[Tag]#
class steamship.data.tags.tag.TimestampTag(start_time_s: float, end_time_s: float, start_idx: int | None = None, end_idx: int | None = None, value: Dict[str, Any] | None = None)[source]#

Bases: Tag

class steamship.data.tags.tag.TokenizationTag(type=<enum 'Type'>, start_idx: Optional[int] = None, end_idx: Optional[int] = None, value: Optional[Dict[str, Any]] = None)[source]#

Bases: Tag

class Type(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

CHARACTER = 'character'#
PARAGRAPH = 'paragraph'#
SENTENCE = 'sentence'#
WORD = 'word'#
class steamship.data.tags.tag.TopicTag(topic: str, start_idx: int | None = None, end_idx: int | None = None, value: Dict[str, Any] | None = None)[source]#

Bases: Tag

steamship.data.tags.tag_constants module#

class steamship.data.tags.tag_constants.ChatTag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

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

CHAT_ID = 'chat-id'#
CHUNK = 'chunk'#
CONTEXT_KEYS = 'context-keys'#
HISTORY = 'history'#
INDEX_HANDLE = 'index-handle'#
MESSAGE = 'message'#
MESSAGE_ID = 'message-id'#
REQUEST_COMPLETE = 'request-complete'#
ROLE = 'role'#
THREAD_ID = 'thread-id'#
USER_ID = 'user-id'#
class steamship.data.tags.tag_constants.DocTag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

A set of name constants 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'#
CHAPTER = 'chapter'#
CHAT = 'chat'#
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'#
METADATA = 'metadata'#
ORDERED_LIST = 'ordered-list'#
PAGE = 'page'#
PARAGRAPH = 'paragraph'#
PRE = 'pre'#
REGION = 'region'#
SENTENCE = 'sentence'#
SOURCE = 'source'#
SPAN = 'span'#
STRONG = 'strong'#
SUBTITLE = 'subtitle'#
TELETYPE = 'teletype'#
TEXT = 'text'#
TITLE = 'title'#
TOKEN = 'token'#
UNDERLINED = 'underlined'#
UNKNOWN = 'unknown'#
UNORDERED_LIST = 'unordered-list'#
static from_html_tag(tagname: str | None) DocTag | None[source]#
class steamship.data.tags.tag_constants.GenerationTag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

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

GIST = 'gist'#
HEADLINE = 'headline'#
PROMPT_COMPLETION = 'prompt-completion'#
SUMMARY = 'summary'#
class steamship.data.tags.tag_constants.ProvenanceTag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

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

FILE = 'file'#
SPEAKER = 'speaker'#
URL = 'url'#
class steamship.data.tags.tag_constants.RoleTag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

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

AGENT = 'agent'#
ASSISTANT = 'assistant'#
FUNCTION = 'function'#
LLM = 'llm'#
SYSTEM = 'system'#
TOOL = 'tool'#
USER = 'user'#
class steamship.data.tags.tag_constants.TagKind(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, 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=DocTag.H1

AGENT_STATUS_MESSAGE = 'agent-status-message'#
CHAT = 'chat'#
CHAT_HISTORY_CONTEXT = 'chat-history-context'#
DEPENDENCY = 'dependency'#
DOCUMENT = 'document'#
EMBEDDING = 'embedding'#
EMOTION = 'emotion'#
ENTITY = 'entity'#
FUNCTION_ARG = 'function-arg'#
FUNCTION_SELECTION = 'function-selection'#
GENERATION = 'generation'#
INTENT = 'intent'#
KIND = 'summary'#
LLM_STATUS_MESSAGE = 'llm-status-message'#
MESSAGE_ID = 'message-id'#
PART_OF_SPEECH = 'part-of-speech'#
PROVENANCE = 'provenance'#
ROLE = 'role'#
SEARCH_RESULT = 'search-result'#
SENTIMENT = 'sentiment'#
STATUS_MESSAGE = 'status-message'#
SUMMARY = 'summary'#
TIMESTAMP = 'timestamp'#
TOKEN = 'token'#
TOKENIZATION = 'tokenization'#
TOOL_STATUS_MESSAGE = 'tool-status-message'#
TOPIC = 'topic'#
class steamship.data.tags.tag_constants.TagValueKey(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

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

BOOL_VALUE = 'bool-value'#
DIRECT = 'direct'#
END_TIME_S = 'end-time-s'#
ENTITY_NAME = 'entity_name'#
NUMBER_VALUE = 'number-value'#
SCORE = 'score'#
START_TIME_S = 'start-time-s'#
STRING_VALUE = 'string-value'#
TIMESTAMP_VALUE = 'timestamp-value'#
VALUE = 'value'#
VECTOR_VALUE = 'vector-value'#
class steamship.data.tags.tag_constants.TokenTag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, 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 = 'text'#
TEXT_WITH_WHITESPACE = 'text-with-whitespace'#
WHITESPACE = 'whitespace'#

steamship.data.tags.tag_utils module#

steamship.data.tags.tag_utils.get_tag(tags: List[Tag] | None, kind: str | None = None, name: str | None = None) Tag | None[source]#

Return the first tag of a list with the provided kind & name.

steamship.data.tags.tag_utils.get_tag_value_key(tags: List[Tag] | None, key: str, kind: str | None = None, name: str | None = None) any | None[source]#

Return the value key from the first tag of a list with the provided kind & name.

Module contents#

class steamship.data.tags.DocTag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

A set of name constants 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'#
CHAPTER = 'chapter'#
CHAT = 'chat'#
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'#
METADATA = 'metadata'#
ORDERED_LIST = 'ordered-list'#
PAGE = 'page'#
PARAGRAPH = 'paragraph'#
PRE = 'pre'#
REGION = 'region'#
SENTENCE = 'sentence'#
SOURCE = 'source'#
SPAN = 'span'#
STRONG = 'strong'#
SUBTITLE = 'subtitle'#
TELETYPE = 'teletype'#
TEXT = 'text'#
TITLE = 'title'#
TOKEN = 'token'#
UNDERLINED = 'underlined'#
UNKNOWN = 'unknown'#
UNORDERED_LIST = 'unordered-list'#
static from_html_tag(tagname: str | None) DocTag | None[source]#
class steamship.data.tags.GenerationTag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

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

GIST = 'gist'#
HEADLINE = 'headline'#
PROMPT_COMPLETION = 'prompt-completion'#
SUMMARY = 'summary'#
class steamship.data.tags.Tag(*, client: Client = None, id: str = None, fileId: str = None, blockId: str | None = None, kind: TagKind | str = None, name: str | None = None, value: Dict[TagValueKey | str, Any] | None = None, startIdx: int | None = None, endIdx: int | None = None, text: str | None = None)[source]#

Bases: CamelModel

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

Bases: Request

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

Bases: Request

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

Bases: Response

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

Index this tag.

kind: TagKind | str#
name: str | None#
classmethod parse_obj(obj: Any) BaseModel[source]#
static query(client: Client, tag_filter_query: str) TagQueryResponse[source]#
start_idx: int | None#
text: str | None#
value: Dict[TagValueKey | str, Any] | None#
class steamship.data.tags.TagKind(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, 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=DocTag.H1

AGENT_STATUS_MESSAGE = 'agent-status-message'#
CHAT = 'chat'#
CHAT_HISTORY_CONTEXT = 'chat-history-context'#
DEPENDENCY = 'dependency'#
DOCUMENT = 'document'#
EMBEDDING = 'embedding'#
EMOTION = 'emotion'#
ENTITY = 'entity'#
FUNCTION_ARG = 'function-arg'#
FUNCTION_SELECTION = 'function-selection'#
GENERATION = 'generation'#
INTENT = 'intent'#
KIND = 'summary'#
LLM_STATUS_MESSAGE = 'llm-status-message'#
MESSAGE_ID = 'message-id'#
PART_OF_SPEECH = 'part-of-speech'#
PROVENANCE = 'provenance'#
ROLE = 'role'#
SEARCH_RESULT = 'search-result'#
SENTIMENT = 'sentiment'#
STATUS_MESSAGE = 'status-message'#
SUMMARY = 'summary'#
TIMESTAMP = 'timestamp'#
TOKEN = 'token'#
TOKENIZATION = 'tokenization'#
TOOL_STATUS_MESSAGE = 'tool-status-message'#
TOPIC = 'topic'#
class steamship.data.tags.TagValueKey(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

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

BOOL_VALUE = 'bool-value'#
DIRECT = 'direct'#
END_TIME_S = 'end-time-s'#
ENTITY_NAME = 'entity_name'#
NUMBER_VALUE = 'number-value'#
SCORE = 'score'#
START_TIME_S = 'start-time-s'#
STRING_VALUE = 'string-value'#
TIMESTAMP_VALUE = 'timestamp-value'#
VALUE = 'value'#
VECTOR_VALUE = 'vector-value'#
class steamship.data.tags.TokenTag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, 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 = 'text'#
TEXT_WITH_WHITESPACE = 'text-with-whitespace'#
WHITESPACE = 'whitespace'#