Skip to content

Commit 24cf6f9

Browse files
committed
Version 1.4.39
1 parent 958a240 commit 24cf6f9

File tree

293 files changed

+2109
-177
lines changed

Some content is hidden

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

293 files changed

+2109
-177
lines changed

abacusai/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
from .code_edits import CodeEdits
4141
from .code_source import CodeSource
4242
from .code_suggestion_validation_response import CodeSuggestionValidationResponse
43+
from .code_summary_response import CodeSummaryResponse
4344
from .compute_point_info import ComputePointInfo
4445
from .concatenation_config import ConcatenationConfig
4546
from .constants_autocomplete_response import ConstantsAutocompleteResponse
@@ -133,6 +134,7 @@
133134
from .inferred_database_column_to_feature_mappings import InferredDatabaseColumnToFeatureMappings
134135
from .inferred_feature_mappings import InferredFeatureMappings
135136
from .item_statistics import ItemStatistics
137+
from .lip_sync_gen_settings import LipSyncGenSettings
136138
from .llm_app import LlmApp
137139
from .llm_code_block import LlmCodeBlock
138140
from .llm_execution_preview import LlmExecutionPreview
@@ -243,4 +245,4 @@
243245
from .workflow_node_template import WorkflowNodeTemplate
244246

245247

246-
__version__ = "1.4.38"
248+
__version__ = "1.4.39"

abacusai/api_class/batch_prediction.py

+2
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,12 @@ class PretrainedModelsBatchPredictionArgs(BatchPredictionArgs):
124124
125125
Args:
126126
for_eval (bool): If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation.
127+
files_input_location (str): The input location for the files.
127128
files_output_location_prefix (str): The output location prefix for the files.
128129
channel_id_to_label_map (str): JSON string for the map from channel ids to their labels.
129130
"""
130131
for_eval: bool = dataclasses.field(default=None)
132+
files_input_location: str = dataclasses.field(default=None)
131133
files_output_location_prefix: str = dataclasses.field(default=None)
132134
channel_id_to_label_map: str = dataclasses.field(default=None)
133135

abacusai/api_class/enums.py

+1
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@ class DeploymentConversationType(ApiEnum):
741741
SEARCH_LLM = 'SEARCH_LLM'
742742
APP_LLM = 'APP_LLM'
743743
TEST_AGENT = 'TEST_AGENT'
744+
SUPER_AGENT = 'SUPER_AGENT'
744745

745746

746747
class AgentClientType(ApiEnum):

abacusai/api_class/model.py

-2
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ class ChatLLMTrainingConfig(TrainingConfig):
487487
json_response_instructions (str): Instructions to be followed while generating the json_response if `response_format` is set to "JSON". This can include the schema information if the schema is dynamic and its keys cannot be pre-determined.
488488
json_response_schema (str): Specifies the JSON schema that the model should adhere to if `response_format` is set to "JSON". This should be a json-formatted string where each field of the expected schema is mapped to a dictionary containing the fields 'type', 'required' and 'description'. For example - '{"sample_field": {"type": "integer", "required": true, "description": "Sample Field"}}'
489489
mask_pii (bool): Mask PII in the prompts and uploaded documents before sending it to the LLM.
490-
custom_tools (List[str]): List of custom tool names to be used in the chat.
491490
"""
492491
document_retrievers: List[str] = dataclasses.field(default=None)
493492
num_completion_tokens: int = dataclasses.field(default=None)
@@ -525,7 +524,6 @@ class ChatLLMTrainingConfig(TrainingConfig):
525524
json_response_instructions: str = dataclasses.field(default=None)
526525
json_response_schema: str = dataclasses.field(default=None)
527526
mask_pii: bool = dataclasses.field(default=None)
528-
custom_tools: List[str] = dataclasses.field(default=None)
529527

530528
def __post_init__(self):
531529
self.problem_type = enums.ProblemType.CHAT_LLM

abacusai/api_client_utils.py

+15-2
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,22 @@ def get_pandas_pages_df(cls, df, feature_group_version: str, doc_id_column: str,
468468

469469
chunk_size = 10 * 1024 * 1024
470470

471+
def is_valid_config(x):
472+
if not isinstance(x, dict):
473+
return False
474+
if cls.DOCUMENT_PROCESSING_CONFIG not in x:
475+
return False
476+
if x[cls.DOCUMENT_PROCESSING_CONFIG] is None:
477+
return False
478+
if x[cls.DOCUMENT_PROCESSING_CONFIG] == {}:
479+
return False
480+
# if all keys are None, return False
481+
if all(v is None for v in x[cls.DOCUMENT_PROCESSING_CONFIG].values()):
482+
return False
483+
return True
484+
471485
pages_df_with_config = None
472-
df_with_config = df[df[document_column].apply(lambda x: isinstance(
473-
x, dict) and x.get(cls.DOCUMENT_PROCESSING_CONFIG) is not None)]
486+
df_with_config = df[df[document_column].apply(is_valid_config)]
474487
df = df[~df[doc_id_column].isin(df_with_config[doc_id_column])]
475488

476489
if len(df_with_config) > 0:

abacusai/batch_prediction.py

+1-1
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

+1-1
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/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ class BaseApiClient:
652652
client_options (ClientOptions): Optional API client configurations
653653
skip_version_check (bool): If true, will skip checking the server's current API version on initializing the client
654654
"""
655-
client_version = '1.4.38'
655+
client_version = '1.4.39'
656656

657657
def __init__(self, api_key: str = None, server: str = None, client_options: ClientOptions = None, skip_version_check: bool = False, include_tb: bool = False):
658658
self.api_key = api_key

abacusai/code_summary_response.py

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
from .return_class import AbstractApiClass
2+
3+
4+
class CodeSummaryResponse(AbstractApiClass):
5+
"""
6+
A summary response from an LLM
7+
8+
Args:
9+
client (ApiClient): An authenticated API Client instance
10+
summary (str): The summary of the code.
11+
"""
12+
13+
def __init__(self, client, summary=None):
14+
super().__init__(client, None)
15+
self.summary = summary
16+
self.deprecated_keys = {}
17+
18+
def __repr__(self):
19+
repr_dict = {f'summary': repr(self.summary)}
20+
class_name = "CodeSummaryResponse"
21+
repr_str = ',\n '.join([f'{key}={value}' for key, value in repr_dict.items(
22+
) if getattr(self, key, None) is not None and key not in self.deprecated_keys])
23+
return f"{class_name}({repr_str})"
24+
25+
def to_dict(self):
26+
"""
27+
Get a dict representation of the parameters in this class
28+
29+
Returns:
30+
dict: The dict value representation of the class parameters
31+
"""
32+
resp = {'summary': self.summary}
33+
return {key: value for key, value in resp.items() if value is not None and key not in self.deprecated_keys}

abacusai/constants_autocomplete_response.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ class ConstantsAutocompleteResponse(AbstractApiClass):
2828
diagnosticEachThreshold (int): The max number of characters to show for each diagnostic type.
2929
numVsCodeSuggestions (int): The number of VS Code suggestions to show.
3030
minReindexingInterval (int): The minimum interval between reindexes in ms.
31+
minRefreshSummaryInterval (int): The minimum interval between refresh summary in ms.
3132
"""
3233

33-
def __init__(self, client, maxPendingRequests=None, acceptanceDelay=None, debounceDelay=None, recordUserAction=None, validateSuggestion=None, validationLinesThreshold=None, maxTrackedRecentChanges=None, diffThreshold=None, derivativeThreshold=None, defaultSurroundingLines=None, maxTrackedVisitChanges=None, selectionCooldownMs=None, viewingCooldownMs=None, maxLines=None, editCooldownMs=None, scrollDebounceMs=None, lspDeadline=None, diagnosticsThreshold=None, diagnosticEachThreshold=None, numVsCodeSuggestions=None, minReindexingInterval=None):
34+
def __init__(self, client, maxPendingRequests=None, acceptanceDelay=None, debounceDelay=None, recordUserAction=None, validateSuggestion=None, validationLinesThreshold=None, maxTrackedRecentChanges=None, diffThreshold=None, derivativeThreshold=None, defaultSurroundingLines=None, maxTrackedVisitChanges=None, selectionCooldownMs=None, viewingCooldownMs=None, maxLines=None, editCooldownMs=None, scrollDebounceMs=None, lspDeadline=None, diagnosticsThreshold=None, diagnosticEachThreshold=None, numVsCodeSuggestions=None, minReindexingInterval=None, minRefreshSummaryInterval=None):
3435
super().__init__(client, None)
3536
self.max_pending_requests = maxPendingRequests
3637
self.acceptance_delay = acceptanceDelay
@@ -53,11 +54,12 @@ def __init__(self, client, maxPendingRequests=None, acceptanceDelay=None, deboun
5354
self.diagnostic_each_threshold = diagnosticEachThreshold
5455
self.num_vs_code_suggestions = numVsCodeSuggestions
5556
self.min_reindexing_interval = minReindexingInterval
57+
self.min_refresh_summary_interval = minRefreshSummaryInterval
5658
self.deprecated_keys = {}
5759

5860
def __repr__(self):
5961
repr_dict = {f'max_pending_requests': repr(self.max_pending_requests), f'acceptance_delay': repr(self.acceptance_delay), f'debounce_delay': repr(self.debounce_delay), f'record_user_action': repr(self.record_user_action), f'validate_suggestion': repr(self.validate_suggestion), f'validation_lines_threshold': repr(self.validation_lines_threshold), f'max_tracked_recent_changes': repr(self.max_tracked_recent_changes), f'diff_threshold': repr(self.diff_threshold), f'derivative_threshold': repr(self.derivative_threshold), f'default_surrounding_lines': repr(self.default_surrounding_lines), f'max_tracked_visit_changes': repr(
60-
self.max_tracked_visit_changes), f'selection_cooldown_ms': repr(self.selection_cooldown_ms), f'viewing_cooldown_ms': repr(self.viewing_cooldown_ms), f'max_lines': repr(self.max_lines), f'edit_cooldown_ms': repr(self.edit_cooldown_ms), f'scroll_debounce_ms': repr(self.scroll_debounce_ms), f'lsp_deadline': repr(self.lsp_deadline), f'diagnostics_threshold': repr(self.diagnostics_threshold), f'diagnostic_each_threshold': repr(self.diagnostic_each_threshold), f'num_vs_code_suggestions': repr(self.num_vs_code_suggestions), f'min_reindexing_interval': repr(self.min_reindexing_interval)}
62+
self.max_tracked_visit_changes), f'selection_cooldown_ms': repr(self.selection_cooldown_ms), f'viewing_cooldown_ms': repr(self.viewing_cooldown_ms), f'max_lines': repr(self.max_lines), f'edit_cooldown_ms': repr(self.edit_cooldown_ms), f'scroll_debounce_ms': repr(self.scroll_debounce_ms), f'lsp_deadline': repr(self.lsp_deadline), f'diagnostics_threshold': repr(self.diagnostics_threshold), f'diagnostic_each_threshold': repr(self.diagnostic_each_threshold), f'num_vs_code_suggestions': repr(self.num_vs_code_suggestions), f'min_reindexing_interval': repr(self.min_reindexing_interval), f'min_refresh_summary_interval': repr(self.min_refresh_summary_interval)}
6163
class_name = "ConstantsAutocompleteResponse"
6264
repr_str = ',\n '.join([f'{key}={value}' for key, value in repr_dict.items(
6365
) if getattr(self, key, None) is not None and key not in self.deprecated_keys])
@@ -70,6 +72,6 @@ def to_dict(self):
7072
Returns:
7173
dict: The dict value representation of the class parameters
7274
"""
73-
resp = {'max_pending_requests': self.max_pending_requests, 'acceptance_delay': self.acceptance_delay, 'debounce_delay': self.debounce_delay, 'record_user_action': self.record_user_action, 'validate_suggestion': self.validate_suggestion, 'validation_lines_threshold': self.validation_lines_threshold, 'max_tracked_recent_changes': self.max_tracked_recent_changes, 'diff_threshold': self.diff_threshold, 'derivative_threshold': self.derivative_threshold, 'default_surrounding_lines': self.default_surrounding_lines,
74-
'max_tracked_visit_changes': self.max_tracked_visit_changes, 'selection_cooldown_ms': self.selection_cooldown_ms, 'viewing_cooldown_ms': self.viewing_cooldown_ms, 'max_lines': self.max_lines, 'edit_cooldown_ms': self.edit_cooldown_ms, 'scroll_debounce_ms': self.scroll_debounce_ms, 'lsp_deadline': self.lsp_deadline, 'diagnostics_threshold': self.diagnostics_threshold, 'diagnostic_each_threshold': self.diagnostic_each_threshold, 'num_vs_code_suggestions': self.num_vs_code_suggestions, 'min_reindexing_interval': self.min_reindexing_interval}
75+
resp = {'max_pending_requests': self.max_pending_requests, 'acceptance_delay': self.acceptance_delay, 'debounce_delay': self.debounce_delay, 'record_user_action': self.record_user_action, 'validate_suggestion': self.validate_suggestion, 'validation_lines_threshold': self.validation_lines_threshold, 'max_tracked_recent_changes': self.max_tracked_recent_changes, 'diff_threshold': self.diff_threshold, 'derivative_threshold': self.derivative_threshold, 'default_surrounding_lines': self.default_surrounding_lines, 'max_tracked_visit_changes': self.max_tracked_visit_changes,
76+
'selection_cooldown_ms': self.selection_cooldown_ms, 'viewing_cooldown_ms': self.viewing_cooldown_ms, 'max_lines': self.max_lines, 'edit_cooldown_ms': self.edit_cooldown_ms, 'scroll_debounce_ms': self.scroll_debounce_ms, 'lsp_deadline': self.lsp_deadline, 'diagnostics_threshold': self.diagnostics_threshold, 'diagnostic_each_threshold': self.diagnostic_each_threshold, 'num_vs_code_suggestions': self.num_vs_code_suggestions, 'min_reindexing_interval': self.min_reindexing_interval, 'min_refresh_summary_interval': self.min_refresh_summary_interval}
7577
return {key: value for key, value in resp.items() if value is not None and key not in self.deprecated_keys}

abacusai/lip_sync_gen_settings.py

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
from .return_class import AbstractApiClass
2+
3+
4+
class LipSyncGenSettings(AbstractApiClass):
5+
"""
6+
Lip sync generation settings
7+
8+
Args:
9+
client (ApiClient): An authenticated API Client instance
10+
model (dict): The model settings.
11+
settings (dict): The settings for each model.
12+
"""
13+
14+
def __init__(self, client, model=None, settings=None):
15+
super().__init__(client, None)
16+
self.model = model
17+
self.settings = settings
18+
self.deprecated_keys = {}
19+
20+
def __repr__(self):
21+
repr_dict = {f'model': repr(self.model),
22+
f'settings': repr(self.settings)}
23+
class_name = "LipSyncGenSettings"
24+
repr_str = ',\n '.join([f'{key}={value}' for key, value in repr_dict.items(
25+
) if getattr(self, key, None) is not None and key not in self.deprecated_keys])
26+
return f"{class_name}({repr_str})"
27+
28+
def to_dict(self):
29+
"""
30+
Get a dict representation of the parameters in this class
31+
32+
Returns:
33+
dict: The dict value representation of the class parameters
34+
"""
35+
resp = {'model': self.model, 'settings': self.settings}
36+
return {key: value for key, value in resp.items() if value is not None and key not in self.deprecated_keys}

docs/_sources/autoapi/abacusai/api_class/batch_prediction/index.rst.txt

+8
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ Module Contents
312312

313313
:param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation.
314314
:type for_eval: bool
315+
:param files_input_location: The input location for the files.
316+
:type files_input_location: str
315317
:param files_output_location_prefix: The output location prefix for the files.
316318
:type files_output_location_prefix: str
317319
:param channel_id_to_label_map: JSON string for the map from channel ids to their labels.
@@ -324,6 +326,12 @@ Module Contents
324326

325327

326328

329+
.. py:attribute:: files_input_location
330+
:type: str
331+
:value: None
332+
333+
334+
327335
.. py:attribute:: files_output_location_prefix
328336
:type: str
329337
:value: None

docs/_sources/autoapi/abacusai/api_class/enums/index.rst.txt

+5
Original file line numberDiff line numberDiff line change
@@ -3065,6 +3065,11 @@ Module Contents
30653065

30663066

30673067

3068+
.. py:attribute:: SUPER_AGENT
3069+
:value: 'SUPER_AGENT'
3070+
3071+
3072+
30683073
.. py:class:: AgentClientType
30693074
30703075
Bases: :py:obj:`ApiEnum`

docs/_sources/autoapi/abacusai/api_class/index.rst.txt

+13-8
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,8 @@ Package Contents
14681468

14691469
:param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation.
14701470
:type for_eval: bool
1471+
:param files_input_location: The input location for the files.
1472+
:type files_input_location: str
14711473
:param files_output_location_prefix: The output location prefix for the files.
14721474
:type files_output_location_prefix: str
14731475
:param channel_id_to_label_map: JSON string for the map from channel ids to their labels.
@@ -1480,6 +1482,12 @@ Package Contents
14801482

14811483

14821484

1485+
.. py:attribute:: files_input_location
1486+
:type: str
1487+
:value: None
1488+
1489+
1490+
14831491
.. py:attribute:: files_output_location_prefix
14841492
:type: str
14851493
:value: None
@@ -6477,6 +6485,11 @@ Package Contents
64776485

64786486

64796487

6488+
.. py:attribute:: SUPER_AGENT
6489+
:value: 'SUPER_AGENT'
6490+
6491+
6492+
64806493
.. py:class:: AgentClientType
64816494
64826495
Bases: :py:obj:`ApiEnum`
@@ -8841,8 +8854,6 @@ Package Contents
88418854
:type json_response_schema: str
88428855
:param mask_pii: Mask PII in the prompts and uploaded documents before sending it to the LLM.
88438856
:type mask_pii: bool
8844-
:param custom_tools: List of custom tool names to be used in the chat.
8845-
:type custom_tools: List[str]
88468857

88478858

88488859
.. py:attribute:: document_retrievers
@@ -9061,12 +9072,6 @@ Package Contents
90619072

90629073

90639074

9064-
.. py:attribute:: custom_tools
9065-
:type: List[str]
9066-
:value: None
9067-
9068-
9069-
90709075
.. py:method:: __post_init__()
90719076
90729077

0 commit comments

Comments
 (0)