abacusai.api_class.segments
Attributes
Classes
An attachment that an agent can return to render attachments. |
|
A response section that an agent can return to render specific UI elements. |
|
A response section that an agent can return to render attachments. |
|
A response section that an AI Agent can return to render a button. |
|
A response section that an agent can return to render an image. |
|
A response section that an agent can return to render text. |
|
A segment that an agent can return to render json and ui schema for workflow nodes. |
|
A response section that an agent can return to render code. |
|
A response section that an agent can return to render a base64 image. |
|
A response section that an agent can return to render a collapsible component. |
|
A response section that an agent can return to render a list. |
|
A response section that an agent can return to render a chart. |
Module Contents
- class abacusai.api_class.segments.Attachment
Bases:
abacusai.api_class.abstract.ApiClass
An attachment that an agent can return to render attachments.
- Parameters:
- to_dict()
Standardizes converting an ApiClass to dictionary. Keys of response dictionary are converted to camel case. This also validates the fields ( type, value, etc ) received in the dictionary.
- class abacusai.api_class.segments.ResponseSection
Bases:
abacusai.api_class.abstract.ApiClass
A response section that an agent can return to render specific UI elements.
- Parameters:
type (ResponseSectionType) – The type of the response.
id (str) – The section key of the segment.
- to_dict()
Standardizes converting an ApiClass to dictionary. Keys of response dictionary are converted to camel case. This also validates the fields ( type, value, etc ) received in the dictionary.
- abacusai.api_class.segments.Segment
- class abacusai.api_class.segments.AttachmentsResponseSection(attachments, section_key=None)
Bases:
ResponseSection
A response section that an agent can return to render attachments.
- Parameters:
attachments (List[Attachment]) – The list of attachments to be displayed.
section_key (str)
- attachments: List[Attachment]
- to_dict()
Standardizes converting an ApiClass to dictionary. Keys of response dictionary are converted to camel case. This also validates the fields ( type, value, etc ) received in the dictionary.
- class abacusai.api_class.segments.AgentFlowButtonResponseSection(label, agent_workflow_node_name, section_key=None)
Bases:
ResponseSection
A response section that an AI Agent can return to render a button.
- Parameters:
- class abacusai.api_class.segments.ImageUrlResponseSection(url, height, width, section_key=None)
Bases:
ResponseSection
A response section that an agent can return to render an image.
- Parameters:
- class abacusai.api_class.segments.TextResponseSection(text, section_key=None)
Bases:
ResponseSection
A response section that an agent can return to render text.
- class abacusai.api_class.segments.RuntimeSchemaResponseSection(json_schema, ui_schema=None, schema_prop=None)
Bases:
ResponseSection
A segment that an agent can return to render json and ui schema for workflow nodes. This is primarily to generate dynamic schema for subsequent workflow nodes.
- Parameters:
- class abacusai.api_class.segments.CodeResponseSection(code, language, section_key=None)
Bases:
ResponseSection
A response section that an agent can return to render code.
- Parameters:
code (str) – The code to be displayed.
language (CodeLanguage) – The language of the code.
section_key (str)
- language: abacusai.api_class.enums.CodeLanguage
- class abacusai.api_class.segments.Base64ImageResponseSection(b64_image, section_key=None)
Bases:
ResponseSection
A response section that an agent can return to render a base64 image.
- class abacusai.api_class.segments.CollapseResponseSection(title, content, section_key=None)
Bases:
ResponseSection
A response section that an agent can return to render a collapsible component.
- Parameters:
title (str) – The title of the collapsible component.
content (ResponseSection) – The response section constituting the content of collapsible component
section_key (str)
- content: ResponseSection
- to_dict()
Standardizes converting an ApiClass to dictionary. Keys of response dictionary are converted to camel case. This also validates the fields ( type, value, etc ) received in the dictionary.
- class abacusai.api_class.segments.ListResponseSection(items, section_key=None)
Bases:
ResponseSection
A response section that an agent can return to render a list.