abacusai.api_class.segments
Attributes
Classes
A response section that an agent can return to render specific UI elements. |
|
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 in react-jsonschema-form format 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. |
|
A response section that an agent can return to render a pandas dataframe. |
Module Contents
- 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.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 in react-jsonschema-form format for workflow nodes. This is primarily used to generate dynamic forms at runtime. If a node returns a runtime schema variable, the UI will render the form upon node execution.
- 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.
- class abacusai.api_class.segments.ChartResponseSection(chart, section_key=None)
Bases:
ResponseSection
A response section that an agent can return to render a chart.
- class abacusai.api_class.segments.DataframeResponseSection(df, header=None, section_key=None)
Bases:
ResponseSection
A response section that an agent can return to render a pandas dataframe. :param df: The dataframe to be displayed. :type df: pandas.DataFrame :param header: Heading of the table to be displayed. :type header: str
- df: Any