You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: abacusai/api_class/dataset.py
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,7 @@ class DocumentProcessingConfig(ApiClass):
45
45
remove_watermarks (bool): Whether to remove watermarks. By default, it will be decided automatically based on the OCR mode and the document type. This option only takes effect when extract_bounding_boxes is True.
46
46
convert_to_markdown (bool): Whether to convert extracted text to markdown. Defaults to False. This option only takes effect when extract_bounding_boxes is True.
47
47
mask_pii (bool): Whether to mask personally identifiable information (PII) in the document text/tokens. Defaults to False.
48
+
extract_images (bool): Whether to extract images from the document e.g. diagrams in a PDF page. Defaults to False.
48
49
"""
49
50
# NOTE: The defaults should match with clouddb.document_processing_results table defaults
50
51
document_type: DocumentType=None
@@ -56,6 +57,7 @@ class DocumentProcessingConfig(ApiClass):
Executes a prompt on a remote computer and streams computer responses to the external chat UI in real-time. Must be called from agent execution context only.
3976
+
3977
+
Args:
3978
+
computer_id (str): The ID of the computer to use for the agent.
3979
+
prompt (str): The prompt to do tasks on the computer.
3980
+
is_transient (bool): If True, the message will be marked as transient and will not be persisted on reload in external chatllm UI. Transient messages are useful for streaming interim updates or results.
3981
+
3982
+
Returns:
3983
+
text (str): The text responses from the computer.
3984
+
"""
3985
+
request_id = self._get_agent_app_request_id()
3986
+
caller = self._get_agent_async_app_caller()
3987
+
proxy_caller = self._is_proxy_app_caller()
3988
+
3989
+
if not request_id or not caller:
3990
+
raise Exception(
3991
+
'This function can only be called from within an agent execution context')
Generate response to the prompt using the specified model. This works the same as `evaluate_prompt` but would stream the text to the UI section while generating and returns the streamed text as an object of a `str` subclass.
function_variable_mappings (List): List of Python function arguments.
7932
8021
package_requirements (list): List of package requirement strings. For example: ['numpy==1.2.3', 'pandas>=1.4.0'].
7933
8022
function_type (str): Type of Python function to create. Default is FEATURE_GROUP, but can also be PLOTLY_FIG.
8023
+
description (str): Description of the Python function. This should include details about the function's purpose, expected inputs and outputs, and any important usage considerations or limitations.
8024
+
examples (dict): Dictionary containing example use cases and anti-patterns. Should include 'positive_examples' showing recommended usage and 'negative_examples' showing cases to avoid.
7934
8025
7935
8026
Returns:
7936
8027
PythonFunction: The Python function that can be used (e.g. for feature group transform)."""
function_name (str): The name of the Python function within `source_code`.
7946
8037
function_variable_mappings (List): List of arguments required by `function_name`.
7947
8038
package_requirements (list): List of package requirement strings. For example: ['numpy==1.2.3', 'pandas>=1.4.0'].
8039
+
description (str): Description of the Python function. This should include details about the function's purpose, expected inputs and outputs, and any important usage considerations or limitations.
8040
+
examples (dict): Dictionary containing example use cases and anti-patterns. Should include 'positive_examples' showing recommended usage and 'negative_examples' showing cases to avoid.
0 commit comments