8000 Version 1.4.25 · mmrech/api_python@0dc989b · GitHub
[go: up one dir, main page]

Skip to content

Commit 0dc989b

Browse files
committed
Version 1.4.25
1 parent 32465b2 commit 0dc989b

File tree

280 files changed

+2965
-357
lines changed

Some content is hidden

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

280 files changed

+2965
-357
lines changed

abacusai/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
from .client import AgentResponse, ApiClient, ApiException, ClientOptions, ReadOnlyClient, _request_context
3232
from .code_autocomplete_response import CodeAutocompleteResponse
3333
from .code_bot import CodeBot
34+
from .code_edit import CodeEdit
3435
from .code_edit_response import CodeEditResponse
36+
from .code_edits import CodeEdits
3537
from .code_source import CodeSource
3638
from .compute_point_info import ComputePointInfo
3739
from .concatenation_config import ConcatenationConfig
@@ -225,8 +227,8 @@
225227
from .web_search_response import WebSearchResponse
226228
from .web_search_result import WebSearchResult
227229
from .webhook import Webhook
228-
from .workflow_graph_node import WorkflowGraphNode
230+
from .workflow_graph_node_details import WorkflowGraphNodeDetails
229231
from .workflow_node_template import WorkflowNodeTemplate
230232

231233

232-
__version__ = "1.4.24"
234+
__version__ = "1.4.25"

abacusai/api_class/dataset_application_connector.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,12 @@ class AbacusUsageMetricsDatasetConfig(ApplicationConnectorDatasetConfig):
177177
Args:
178178
include_entire_conversation_history (bool): Whether to show the entire history for this deployment conversation
179179
include_all_feedback (bool): Whether to include all feedback for this deployment conversation
180+
resolve_matching_documents (bool): Whether to get matching document references for response instead of prompt.
181+
Needs to recalculate them if highlights are unavailable in summary_info
180182
"""
181183
include_entire_conversation_history: bool = dataclasses.field(default=False)
182184
include_all_feedback: bool = dataclasses.field(default=False)
185+
resolve_matching_documents: bool = dataclasses.field(default=False)
183186

184187
def __post_init__(self):
185188
self.application_connector_type = enums.ApplicationConnectorType.ABACUSUSAGEMETRICS

abacusai/api_class/enums.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ class LLMName(ApiEnum):
482482
CLAUDE_V3_5_HAIKU = 'CLAUDE_V3_5_HAIKU'
483483
GEMINI_1_5_PRO = 'GEMINI_1_5_PRO'
484484
GEMINI_2_FLASH = 'GEMINI_2_FLASH'
485+
GEMINI_2_FLASH_THINKING = 'GEMINI_2_FLASH_THINKING'
485486
ABACUS_SMAUG3 = 'ABACUS_SMAUG3'
486487
ABACUS_DRACARYS = 'ABACUS_DRACARYS'
487488
QWEN_2_5_32B = 'QWEN_2_5_32B'
@@ -490,6 +491,7 @@ class LLMName(ApiEnum):
490491
QWQ_32B = 'QWQ_32B'
491492
GEMINI_1_5_FLASH = 'GEMINI_1_5_FLASH'
492493
XAI_GROK = 'XAI_GROK'
494+
DEEPSEEK_V3 = 'DEEPSEEK_V3'
493495

494496

495497
class MonitorAlertType(ApiEnum):

abacusai/api_class/model.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,10 +800,13 @@ class OptimizationTrainingConfig(TrainingConfig):
800800
Args:
801801
solve_time_limit (float): The maximum time in seconds to spend solving the problem. Accepts values between 0 and 86400.
802802
optimality_gap_limit (float): The stopping optimality gap limit. Optimality gap is fractional difference between the best known solution and the best possible solution. Accepts values between 0 and 1.
803-
803+
include_all_partitions (bool): Include all partitions in the model training. Default is False.
804+
include_specific_partitions (List[str]): Include specific partitions in partitioned model training. Default is empty list.
804805
"""
805806
solve_time_limit: float = dataclasses.field(default=None)
806807
optimality_gap_limit: float = dataclasses.field(default=None)
808+
include_all_partitions: bool = dataclasses.field(default=None)
809+
include_specific_partitions: List[str] = dataclasses.field(default=None)
807810

808811
def __post_init__(self):
809812
self.problem_type = enums.ProblemType.OPTIMIZATION

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 = {'explanations', 'global_prediction_args'}
87+
self.deprecated_keys = {'global_prediction_args', 'explanations'}
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 = {'explanations', 'global_prediction_args'}
103+
self.deprecated_keys = {'global_prediction_args', 'explanations'}
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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@
181181
from .web_page_response import WebPageResponse
182182
from .web_search_response import WebSearchResponse
183183
from .webhook import Webhook
184-
from .workflow_graph_node import WorkflowGraphNode
185184
from .workflow_node_template import WorkflowNodeTemplate
186185

187186

@@ -636,7 +635,7 @@ class BaseApiClient:
636635
client_options (ClientOptions): Optional API client configurations
637636
skip_version_check (bool): If true, will skip checking the server's current API version on initializing the client
638637
"""
639-
client_version = '1.4.24'
638+
client_version = '1.4.25'
640639

641640
def __init__(self, api_key: str = None, server: str = None, client_options: ClientOptions = None, skip_version_check: bool = False, include_tb: bool = False):
642641
self.api_key = api_key
@@ -2979,7 +2978,7 @@ def update_feature_group_from_pandas_df(self, table_name: str, df, clean_column_
29792978
"""Updates a DATASET Feature Group from a local Pandas DataFrame.
29802979

29812980
Args:
2982-
table_name (str): The table name to assign to the feature group created by this call
2981+
table_name (str): The table name of the existing feature group to update. A feature group with this name must exist and must have source type DATASET.
29832982
df (pandas.DataFrame): The dataframe to upload
29842983
clean_column_names (bool): If true, the dataframe's column names will be automatically cleaned to be complaint with Abacus.AI's column requirements. Otherwise it will raise a ValueError.
29852984
"""

abacusai/code_edit.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 CodeEdit(AbstractApiClass):
5+
"""
6+
A code edit response from an LLM
7+
8+
Args:
9+
client (ApiClient): An authenticated API Client instance
10+
filePath (str): The path of the file to be edited.
11+
startLine (int): The start line of the code to be replaced.
12+
endLine (int): The end line of the code to be replaced.
13+
text (str): The new text.
14+
"""
15+
16+
def __init__(self, client, filePath=None, startLine=None, endLine=None, text=None):
17+
super().__init__(client, None)
18+
self.file_path = filePath
19+
self.start_line = startLine
20+
self.end_line = endLine
21+
self.text = text
22+
self.deprecated_keys = {}
23+
24+
def __repr__(self):
25+
repr_dict = {f'file_path': repr(self.file_path), f'start_line': repr(
26+
self.start_line), f'end_line': repr(self.end_line), f'text': repr(self.text)}
27+
class_name = "CodeEdit"
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 = {'file_path': self.file_path, 'start_line': self.start_line,
40+
'end_line': self.end_line, 'text': self.text}
41+
return {key: value for key, value in resp.items() if value is not None and key not in self.deprecated_keys}

abacusai/code_edits.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
from .return_class import AbstractApiClass
2+
3+
4+
class CodeEdits(AbstractApiClass):
5+
"""
6+
A code edit response from an LLM
7+
8+
Args:
9+
client (ApiClient): An authenticated API Client instance
10+
codeEdits (list[codeedit]): The code changes to be applied.
11+
"""
12+
13+
def __init__(self, client, codeEdits=None):
14+
super().__init__(client, None)
15+
self.code_edits = codeEdits
16+
self.deprecated_keys = {}
17+
18+
def __repr__(self):
19+
repr_dict = {f'code_edits': repr(self.code_edits)}
20+
class_name = "CodeEdits"
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 = {'code_edits': self.code_edits}
33+
return {key: value for key, value in resp.items() if value is not None and key not in self.deprecated_keys}

abacusai/deployment_conversation.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class DeploymentConversation(AbstractApiClass):
1313
deploymentId (str): The deployment id associated with the deployment conversation.
1414
createdAt (str): The timestamp at which the deployment conversation was created.
1515
lastEventCreatedAt (str): The timestamp at which the most recent corresponding deployment conversation event was created at.
16+
hasHistory (bool): Whether the deployment conversation has any history.
1617
externalSessionId (str): The external session id associated with the deployment conversation.
1718
regenerateAttempt (int): The sequence number of regeneration. Not regenerated if 0.
1819
externalApplicationId (str): The external application id associated with the deployment conversation.
@@ -27,13 +28,14 @@ class DeploymentConversation(AbstractApiClass):
2728
history (DeploymentConversationEvent): The history of the deployment conversation.
2829
"""
2930

30-
def __init__(self, client, deploymentConversationId=None, name=None, deploymentId=None, createdAt=None, lastEventCreatedAt=None, externalSessionId=None, regenerateAttempt=None, externalApplicationId=None, unusedDocumentUploadIds=None, humanizeInstructions=None, conversationWarning=None, conversationType=None, metadata=None, llmDisplayName=None, llmBotIcon=None, searchSuggestions=None, history={}):
31+
def __init__(self, client, deploymentConversationId=None, name=None, deploymentId=None, createdAt=None, lastEventCreatedAt=None, hasHistory=None, externalSessionId=None, regenerateAttempt=None, externalApplicationId=None, unusedDocumentUploadIds=None, humanizeInstructions=None, conversationWarning=None, conversationType=None, metadata=None, llmDisplayName=None, llmBotIcon=None, searchSuggestions=None, history={}):
3132
super().__init__(client, deploymentConversationId)
3233
self.deployment_conversation_id = deploymentConversationId
3334
self.name = name
3435
self.deployment_id = deploymentId
3536
self.created_at = createdAt
3637
self.last_event_created_at = lastEventCreatedAt
38+
self.has_history = hasHistory
3739
self.external_session_id = externalSessionId
3840
self.regenerate_attempt = regenerateAttempt
3941
self.external_application_id = externalApplicationId
@@ -50,8 +52,8 @@ def __init__(self, client, deploymentConversationId=None, name=None, deploymentI
5052
self.deprecated_keys = {}
5153

5254
def __repr__(self):
53-
repr_dict = {f'deployment_conversation_id': repr(self.deployment_conversation_id), f'name': repr(self.name), f'deployment_id': repr(self.deployment_id), f'created_at': repr(self.created_at), f'last_event_created_at': repr(self.last_event_created_at), f'external_session_id': repr(self.external_session_id), f'regenerate_attempt': repr(self.regenerate_attempt), f'external_application_id': repr(self.external_application_id), f'unused_document_upload_ids': repr(
54-
self.unused_document_upload_ids), f'humanize_instructions': repr(self.humanize_instructions), f'conversation_warning': repr(self.conversation_warning), f'conversation_type': repr(self.conversation_type), f'metadata': repr(self.metadata), f'llm_display_name': repr(self.llm_display_name), f'llm_bot_icon': repr(self.llm_bot_icon), f'search_suggestions': repr(self.search_suggestions), f'history': repr(self.history)}
55+
repr_dict = {f'deployment_conversation_id': repr(self.deployment_conversation_id), f'name': repr(self.name), f'deployment_id': repr(self.deployment_id), f'created_at': repr(self.created_at), f'last_event_created_at': repr(self.last_event_created_at), f'has_history': repr(self.has_history), f'external_session_id': repr(self.external_session_id), f'regenerate_attempt': repr(self.regenerate_attempt), f'external_application_id': repr(
56+
self.external_application_id), f'unused_document_upload_ids': repr(self.unused_document_upload_ids), f'humanize_instructions': repr(self.humanize_instructions), f'conversation_warning': repr(self.conversation_warning), f'conversation_type': repr(self.conversation_type), f'metadata': repr(self.metadata), f'llm_display_name': repr(self.llm_display_name), f'llm_bot_icon': repr(self.llm_bot_icon), f'search_suggestions': repr(self.search_suggestions), f'history': repr(self.history)}
5557
class_name = "DeploymentConversation"
5658
repr_str = ',\n '.join([f'{key}={value}' for key, value in repr_dict.items(
5759
) if getattr(self, key, None) is not None and key not in self.deprecated_keys])
@@ -64,8 +66,8 @@ def to_dict(self):
6466
Returns:
6567
dict: The dict value representation of the class parameters
6668
"""
67-
resp = {'deployment_conversation_id': self.deployment_conversation_id, 'name': self.name, 'deployment_id': self.deployment_id, 'created_at': self.created_at, 'last_event_created_at': self.last_event_created_at, 'external_session_id': self.external_session_id, 'regenerate_attempt': self.regenerate_attempt, 'external_application_id': self.external_application_id, 'unused_document_upload_ids':
68-
self.unused_document_upload_ids, 'humanize_instructions': self.humanize_instructions, 'conversation_warning': self.conversation_warning, 'conversation_type': self.conversation_type, 'metadata': self.metadata, 'llm_display_name': self.llm_display_name, 'llm_bot_icon': self.llm_bot_icon, 'search_suggestions': self.search_suggestions, 'history': self._get_attribute_as_dict(self.history)}
69+
resp = {'deployment_conversation_id': self.deployment_conversation_id, 'name': self.name, 'deployment_id': self.deployment_id, 'created_at': self.created_at, 'last_event_created_at': self.last_event_created_at, 'has_history': self.has_history, 'external_session_id': self.external_session_id, 'regenerate_attempt': self.regenerate_attempt, 'external_application_id': self.external_application_id,
70+
'unused_document_upload_ids': self.unused_document_upload_ids, 'humanize_instructions': self.humanize_instructions, 'conversation_warning': self.conversation_warning, 'conversation_type': self.conversation_type, 'metadata': self.metadata, 'llm_display_name': self.llm_display_name, 'llm_bot_icon': self.llm_bot_icon, 'search_suggestions': self.search_suggestions, 'history': self._get_attribute_as_dict(self.history)}
6971
return {key: value for key, value in resp.items() if value is not None and key not in self.deprecated_keys}
7072

7173
def get(self, external_session_id: str = None, deployment_id: str = None, filter_intermediate_conversation_events: bool = True, get_unused_document_uploads: bool = False):

0 commit comments

Comments
 (0)
0