8000 Version 1.4.5 · mmrech/api_python@dc6107c · GitHub
[go: up one dir, main page]

Skip to content

Commit dc6107c

Browse files
author
Austin Zielman
committed
Version 1.4.5
1 parent bc1806a commit dc6107c

File tree

246 files changed

+2070
-279
lines changed
  • api_class
  • api_client_utils
  • api_endpoint
  • api_key
  • app_user_group
  • application_connector
  • batch_prediction_version_logs
  • batch_prediction_version
  • batch_prediction
  • bot_info
  • categorical_range_violation
  • chat_message
  • chat_session
  • chatllm_referral_invite
  • client
  • code_source
  • concatenation_config
  • cpu_gpu_memory_specs
  • cryptography
  • custom_chat_instructions
  • custom_loss_function
  • custom_metric_version
  • custom_metric
  • custom_train_function_info
  • data_consistency_duplication
  • data_metrics
  • data_prep_logs
  • data_quality_results
  • data_upload_result
  • database_column_feature_mapping
  • database_connector_column
  • database_connector_schema
  • database_connector
  • dataset_column
  • dataset_version_logs
  • dataset_version
  • dataset
  • deployment_auth_token
  • deployment_conversation_event
  • deployment_conversation_export
  • deployment_conversation
  • deployment_statistics
  • deployment
  • document_data
  • document_retriever_config
  • document_retriever_lookup_result
  • document_retriever_version
  • document_retriever
  • drift_distributions
  • drift_distribution
  • eda_chart_description
  • eda_collinearity
  • eda_data_consistency
  • eda_feature_association
  • eda_feature_collinearity
  • eda_forecasting_analysis
  • eda_version
  • eda
  • embedding_feature_drift_distribution
  • execute_feature_group_operation
  • external_application
  • external_invite
  • extracted_fields
  • feature_distribution
  • feature_drift_record
  • feature_drift_summary
  • feature_group_document
  • feature_group_export_config
  • feature_group_export_download_url
  • feature_group_export
  • feature_group_lineage
  • feature_group_refresh_export_config
  • feature_group_row_process_logs
  • feature_group_row_process_summary
  • feature_group_row_process
  • feature_group_row
  • feature_group_template_variable_options
  • feature_group_template
  • feature_group_version_logs
  • feature_group_version
  • feature_group
  • feature_importance
  • feature_mapping
  • feature_performance_analysis
  • feature_record
  • feature
  • file_connector_instructions
  • file_connector_verification
  • file_connector
  • finetuned_pretrained_model
  • forecasting_analysis_graph_data
  • forecasting_monitor_item_analysis
  • forecasting_monitor_summary
  • function_logs
  • generated_pit_feature_config_option
  • global_context
  • graph_dashboard
  • holdout_analysis_version
  • holdout_analysis
  • hosted_model_token
  • indexing_config
  • inferred_database_column_to_feature_mappings
  • inferred_feature_mappings
  • item_statistics
  • llm_app
  • llm_code_block
  • llm_execution_preview
  • llm_execution_result
  • llm_generated_code
  • llm_input
  • llm_parameters
  • llm_response
  • memory_options
  • messaging_connector_response
  • model_artifacts_export
  • model_blueprint_export
  • model_blueprint_stage
  • model_location
  • model_metrics
  • model_monitor_org_summary
  • model_monitor_summary_from_org
  • model_monitor_summary
  • model_monitor_version_metric_data
  • model_monitor_version
  • model_monitor
  • model_training_type_for_deployment
  • model_upload
  • model_version_feature_group_schema
  • model_version
  • model
  • modification_lock_info
  • module
  • monitor_alert_version
  • monitor_alert
  • monitor_drift_and_distributions
  • natural_language_explanation
  • nested_feature_schema
  • nested_feature
  • null_violation
  • organization_external_application_settings
  • organization_group
  • organization_search_result
  • organization_secret
  • page_data
  • pipeline_reference
  • pipeline_step_version_logs
  • pipeline_step_version_reference
  • pipeline_step_version
  • pipeline_step
  • pipeline_version_logs
  • pipeline_version
  • pipeline
  • point_in_time_feature_info
  • point_in_time_feature
  • point_in_time_group_feature
  • point_in_time_group
  • prediction_client
  • prediction_dataset
  • prediction_feature_group
  • prediction_input
  • prediction_log_record
  • prediction_operator_version
  • prediction_operator
  • problem_type
  • project_config
  • project_feature_group_schema_version
  • project_feature_group_schema
  • project_feature_group
  • project_validation
  • project
  • python_function_validator
  • python_function
  • python_plot_function
  • range_violation
  • realtime_monitor
  • refresh_pipeline_run
  • refresh_policy
  • refresh_schedule
  • resolved_feature_group_template
  • return_class
  • schema
  • streaming_auth_token
  • streaming_client
  • streaming_connector
  • streaming_row_count
  • streaming_sample_code
  • test_point_predictions
  • tone_details
  • training_config_options
  • upload_part
  • upload
  • use_case_requirements
  • use_case
  • user_exception
  • user
  • web_search_response
  • web_search_result
  • webhook
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    246 files changed

    +2070
    -279
    lines changed

    abacusai/__init__.py

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -4,4 +4,4 @@
    44
    from .streaming_client import StreamingClient
    55

    66

    7-
    __version__ = "1.4.4"
    7+
    __version__ = "1.4.5"

    abacusai/api_class/abstract.py

    Lines changed: 6 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -295,4 +295,10 @@ def from_dict(cls, config: dict) -> ApiClass:
    295295
    if not config_class._upper_snake_case_keys:
    296296
    config = {snake_case(k): v for k, v in config.items()}
    297297
    config.pop(snake_case(config_class_key), None)
    298+
    299+
    supported_fields = set([field.name for field in dataclasses.fields(config_class)])
    300+
    actual_fields = set(snake_case(key) for key in config.keys())
    301+
    if not actual_fields.issubset(supported_fields):
    302+
    raise ValueError(f'Unknown fields for {config_class_type}: {actual_fields - supported_fields}')
    303+
    298304
    return config_class(**config)

    abacusai/api_class/ai_agents.py

    Lines changed: 7 additions & 5 deletions
    Original file line numberDiff line numberDiff line change
    @@ -274,15 +274,17 @@ def to_dict(self):
    274274

    275275
    @classmethod
    276276
    def from_dict(cls, graph: dict):
    277+
    nodes = [WorkflowGraphNode.from_dict(node) for node in graph.< F438 span class=pl-c1>get('nodes', [])]
    278+
    edges = [WorkflowGraphEdge.from_dict(edge) for edge in graph.get('edges', [])]
    277279
    if graph.get('primary_start_node') is None:
    278280
    non_primary_nodes = set()
    279-
    for edges in graph.get('edges', []):
    280-
    non_primary_nodes.add(edges['target'])
    281-
    primary_nodes = set([node['name'] for node in graph.get('nodes', [])]) - non_primary_nodes
    281+
    for edge in edges:
    282+
    non_primary_nodes.add(edge.target)
    283+
    primary_nodes = set([node.name for node in nodes]) - non_primary_nodes
    282284
    graph['primary_start_node'] = primary_nodes.pop() if primary_nodes else None
    283285

    284286
    return cls(
    285-
    nodes=[WorkflowGraphNode.from_dict(node) for node in graph.get('nodes', [])],
    286-
    edges=[WorkflowGraphEdge.from_dict(edge) for edge in graph.get('edges', [])],
    287+
    nodes=nodes,
    288+
    edges=edges,
    287289
    primary_start_node=graph.get('primary_start_node', None)
    288290
    )

    abacusai/api_class/enums.py

    Lines changed: 8 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -133,6 +133,7 @@ class OperatorType(ApiEnum):
    133133
    MARKDOWN = 'MARKDOWN'
    134134
    CRAWLER = 'CRAWLER'
    135135
    EXTRACT_DOCUMENT_DATA = 'EXTRACT_DOCUMENT_DATA'
    136+
    DATA_GENERATION = 'DATA_GENERATION'
    136137

    137138

    138139
    class MarkdownOperatorInputType(ApiEnum):
    @@ -380,7 +381,13 @@ class ApplicationConnectorType(ApiEnum):
    380381
    FRESHSERVICE = 'FRESHSERVICE'
    381382
    ZENDESKSUNSHINEMESSAGING = 'ZENDESKSUNSHINEMESSAGING'
    382383
    GOOGLEDRIVEUSER = 'GOOGLEDRIVEUSER'
    384+
    GOOGLEWORKSPACEUSER = 'GOOGLEWORKSPACEUSER'
    385+
    GMAILUSER = 'GMAILUSER'
    386+
    GOOGLECALENDARUSER = 'GOOGLECALENDARUSER'
    387+
    GOOGLESHEETSUSER = 'GOOGLESHEETSUSER'
    388+
    GOOGLEDOCSUSER = 'GOOGLEDOCSUSER'
    383389
    ONEDRIVEUSER = 'ONEDRIVEUSER'
    390+
    JIRAAUTH = 'JIRAAUTH'
    384391

    385392

    386393
    class StreamingConnectorType(ApiEnum):
    @@ -524,6 +531,7 @@ class WorkflowNodeOutputType(ApiEnum):
    524531
    LIST = 'LIST'
    525532
    STRING = 'STRING'
    526533
    RUNTIME_SCHEMA = 'RUNTIME_SCHEMA'
    534+
    NONE = 'NONE'
    527535

    528536

    529537
    class OcrMode(ApiEnum):

    abacusai/api_class/feature_group.py

    Lines changed: 30 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -217,6 +217,35 @@ def __post_init__(self):
    217217
    self.operator_type = enums.OperatorType.EXTRACT_DOCUMENT_DATA
    218218

    219219

    220+
    # TODO: create nested dict object so this does not need to be in sync with UI.
    221+
    @dataclasses.dataclass
    222+
    class DataGenerationConfig(OperatorConfig):
    223+
    """ Generate synthetic data using a model for finetuning an LLM.
    224+
    225+
    Args:
    226+
    prompt_col (str): Name of the input prompt column.
    227+
    completion_col (str): Name of the output completion column.
    228+
    description_col (str): Name of the description column.
    229+
    id_col (str): Name of the identifier column.
    230+
    generation_instructions (str): Instructions for the data generation model.
    231+
    temperature (float): Sampling temperature for the model.
    232+
    fewshot_examples (int): Number of fewshot examples used to prompt the model.
    233+
    """
    234+
    # required
    235+
    prompt_col: str = dataclasses.field(default=None)
    236+
    completion_col: str = dataclasses.field(default=None)
    237+
    description_col: str = dataclasses.field(default=None)
    238+
    id_col: str = dataclasses.field(default=None)
    239+
    generation_instructions: str = dataclasses.field(default=None)
    240+
    241+
    # optional
    242+
    temperature: float = dataclasses.field(default=None)
    243+
    fewshot_examples: int = dataclasses.field(default=None)
    244+
    245+
    def __post_init__(self):
    246+
    self.operator_type = enums.OperatorType.DATA_GENERATION
    247+
    248+
    220249
    @dataclasses.dataclass
    221250
    class _OperatorConfigFactory(_ApiClassFactory):
    222251
    """A class to select and return the the correct type of Operator Config based on a serialized OperatorConfig instance. """
    @@ -227,4 +256,5 @@ class _OperatorConfigFactory(_ApiClassFactory):
    227256
    enums.OperatorType.MARKDOWN: MarkdownConfig,
    228257
    enums.OperatorType.CRAWLER: CrawlerTransformConfig,
    229258
    enums.OperatorType.EXTRACT_DOCUMENT_DATA: ExtractDocumentDataConfig,
    259+
    enums.OperatorType.DATA_GENERATION: DataGenerationConfig,
    230260
    }

    abacusai/api_class/model.py

    Lines changed: 4 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -470,6 +470,7 @@ class ChatLLMTrainingConfig(TrainingConfig):
    470470
    data_feature_group_ids: (List[str]): List of feature group IDs to use to possibly query for the ChatLLM. The created ChatLLM is commonly referred to as DataLLM.
    471471
    data_prompt_context (str): Prompt context for the data feature group IDs.
    472472
    data_prompt_table_context (Dict[str, str]): Dict of table name and table context pairs to provide table wise context for each structured data table.
    473+
    data_prompt_column_context (Dict[str, str]): Dict of 'table_name.column_name' and 'column_context' pairs to provide column context for some selected columns in the selected structured data table. This replaces the default auto-generated information about the column data.
    473474
    hide_sql_and_code (bool): When running data queries, this will hide the generated SQL and Code in the response.
    474475
    disable_data_summarization (bool): After executing a query summarize the reponse and reply back with only the table and query run.
    475476
    data_columns_to_ignore (List[str]): Columns to ignore while encoding information about structured data tables in context for the LLM. A list of strings of format "<table_name>.<column_name>"
    @@ -498,6 +499,7 @@ class ChatLLMTrainingConfig(TrainingConfig):
    498499
    data_feature_group_ids: List[str] = dataclasses.field(default=None)
    499500
    data_prompt_context: str = dataclasses.field(default=None)
    500501
    data_prompt_table_context: Dict[str, str] = dataclasses.field(default=None)
    502+
    data_prompt_column_context: Dict[str, str] = dataclasses.field(default=None)
    501503
    hide_sql_and_code: bool = dataclasses.field(default=None)
    502504
    disable_data_summarization: bool = dataclasses.field(default=None)
    503505
    data_columns_to_ignore: List[str] = dataclasses.field(default=None)
    @@ -727,9 +729,11 @@ class AIAgentTrainingConfig(TrainingConfig):
    727729
    Args:
    728730
    description (str): Description of the agent function.
    729731
    agent_interface (AgentInterface): The interface that the agent will be deployed with.
    732+
    agent_connectors: (List[enums.ApplicationConnectorType]): The connectors needed for the agent to function.
    730733
    """
    731734
    description: str = dataclasses.field(default=None)
    732735
    agent_interface: enums.AgentInterface = dataclasses.field(default=None)
    736+
    agent_connectors: List[enums.ApplicationConnectorType] = dataclasses.field(default=None)
    733737
    enable_binary_input: bool = dataclasses.field(default=None, metadata={'deprecated': True})
    734738
    agent_input_schema: dict = dataclasses.field(default=None, metadata={'deprecated': True})
    735739
    agent_output_schema: dict = dataclasses.field(default=None, metadata={'deprecated': True})

    abacusai/batch_prediction.py

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -84,7 +84,7 @@ def __init__(self, client, batchPredictionId=None, createdAt=None, name=None, de
    8484
    BatchPredictionArgs, globalPredictionArgs)
    8585
    self.batch_prediction_args = client._build_class(getattr(
    8686
    api_class, batchPredictionArgsType, BatchPredictionArgs) if batchPredictionArgsType else BatchPredictionArgs, batchPredictionArgs)
    87-
    self.deprecated_keys = {'global_prediction_args', 'explanations'}
    87+
    self.deprecated_keys = {'explanations', 'global_prediction_args'}
    8888

    8989
    def __repr__(self):
    9090
    repr_dict = {f'batch_prediction_id': repr(self.batch_prediction_id), f'created_at': repr(self.created_at), f'name': repr(self.name), f'deployment_id': repr(self.deployment_id), f'file_connector_output_location': repr(self.file_connector_output_location), f'database_connector_id': repr(self.database_connector_id), f'database_output_configuration': repr(self.database_output_configuration), f'file_output_format': repr(self.file_output_format), f'connector_type': repr(self.connector_type), f'legacy_input_location': repr(self.legacy_input_location), f'output_feature_group_id': repr(self.output_feature_group_id), f'feature_group_table_name': repr(self.feature_group_table_name), f'output_feature_group_table_name': repr(self.output_feature_group_table_name), f'summary_feature_group_table_name': repr(self.summary_feature_group_table_name), f'csv_input_prefix': repr(

    abacusai/batch_prediction_version.py

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -100,7 +100,7 @@ def __init__(self, client, batchPredictionVersion=None, batchPredictionId=None,
    100100
    BatchPredictionArgs, globalPredictionArgs)
    101101
    self.batch_prediction_args = client._build_class(getattr(
    102102
    api_class, batchPredictionArgsType, BatchPredictionArgs) if batchPredictionArgsType else BatchPredictionArgs, batchPredictionArgs)
    103-
    self.deprecated_keys = {'global_prediction_args', 'explanations'}
    103+
    self.deprecated_keys = {'explanations', 'global_prediction_args'}
    104104

    105105
    def __repr__(self):
    106106
    repr_dict = {f'batch_prediction_version': repr(self.batch_prediction_version), f'batch_prediction_id': repr(self.batch_prediction_id), f'status': repr(self.status), f'drift_monitor_status': repr(self.drift_monitor_status), f'deployment_id': repr(self.deployment_id), f'model_id': repr(self.model_id), f'model_version': repr(self.model_version), f'predictions_started_at': repr(self.predictions_started_at), f'predictions_completed_at': repr(self.predictions_completed_at), f'database_output_error': repr(self.database_output_error), f'total_predictions': repr(self.total_predictions), f'failed_predictions': repr(self.failed_predictions), f'database_connector_id': repr(self.database_connector_id), f'database_output_configuration': repr(self.database_output_configuration), f'file_connector_output_location': repr(self.file_connector_output_location), f'file_output_format': repr(self.file_output_format), f'connector_type': repr(self.connector_type), f'legacy_input_location': repr(self.legacy_input_location), f'error': repr(self.error), f'drift_monitor_error': repr(self.drift_monitor_error), f'monitor_warnings': repr(self.monitor_warnings), f'csv_input_prefix': repr(

    abacusai/bot_info.py

    Lines changed: 41 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,41 @@
    1+
    from .return_class import AbstractApiClass
    2+
    3+
    4+
    class BotInfo(AbstractApiClass):
    5+
    """
    6+
    Information about an external application and LLM.
    7+
    8+
    Args:
    9+
    client (ApiClient): An authenticated API Client instance
    10+
    externalApplicationId (str): The external application ID.
    11+
    llmName (str): The name of the LLM model. Only used for system-created bots.
    12+
    llmDisplayName (str): The display name of the LLM model. Only used for system-created bots.
    13+
    llmBotIcon (str): The icon location of the LLM model. Only used for system-created bots.
    14+
    """
    15+
    16+
    def __init__(self, client, externalApplicationId=None, llmName=None, llmDisplayName=None, llmBotIcon=None):
    17+
    super().__init__(client, None)
    18+
    self.external_application_id = externalApplicationId
    19+
    self.llm_name = llmName
    20+
    self.llm_display_name = llmDisplayName
    21+
    self.llm_bot_icon = llmBotIcon
    22+
    self.deprecated_keys = {}
    23+
    24+
    def __repr__(self):
    25+
    repr_dict = {f'external_application_id': repr(self.external_application_id), f'llm_name': repr(
    26+
    self.llm_name), f'llm_display_name': repr(self.llm_display_name), f'llm_bot_icon': repr(self.llm_bot_icon)}
    27+
    class_name = "BotInfo"
    28+
    repr_str = ',\n '.join([f'{key}={value}' for key, value in repr_dict.items(
    29+
    ) if getattr(self, key, None) is not None and key not in self.deprecated_keys])
    30+
    return f"{class_name}({repr_str})"
    31+
    32+
    def to_dict(self):
    33+
    """
    34+
    Get a dict representation of the parameters in this class
    35+
    36+
    Returns:
    37+
    dict: The dict value representation of the class parameters
    38+
    """
    39+
    resp = {'external_application_id': self.external_application_id, 'llm_name': self.llm_name,
    40+
    'llm_display_name': self.llm_display_name, 'llm_bot_icon': self.llm_bot_icon}
    41+
    return {key: value for key, value in resp.items() if value is not None and key not in self.deprecated_keys}

    0 commit comments

    Comments
     (0)
    0