diff --git a/src/unstract/sdk/__init__.py b/src/unstract/sdk/__init__.py index 610a2805..cd0aa2b3 100644 --- a/src/unstract/sdk/__init__.py +++ b/src/unstract/sdk/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.28.0" +__version__ = "0.29.0" def get_sdk_version(): diff --git a/src/unstract/sdk/embedding.py b/src/unstract/sdk/embedding.py index b4aac9c1..a644a788 100644 --- a/src/unstract/sdk/embedding.py +++ b/src/unstract/sdk/embedding.py @@ -22,7 +22,7 @@ def __init__( self, tool: BaseTool, adapter_instance_id: str, - usage_kwargs: dict[Any, Any] = None, + usage_kwargs: dict[Any, Any] = {}, ): self._tool = tool self._adapter_instance_id = adapter_instance_id diff --git a/src/unstract/sdk/index.py b/src/unstract/sdk/index.py index 4f2e4b4d..271fa4fd 100644 --- a/src/unstract/sdk/index.py +++ b/src/unstract/sdk/index.py @@ -32,7 +32,7 @@ def get_text_from_index( embedding_instance_id: str, vector_db_instance_id: str, doc_id: str, - usage_kwargs: dict[Any, Any] = None, + usage_kwargs: dict[Any, Any] = {}, ): try: embedding = Embedding( @@ -126,7 +126,7 @@ def index_file( reindex: bool = False, file_hash: Optional[str] = None, output_file_path: Optional[str] = None, - usage_kwargs: dict[Any, Any] = None, + usage_kwargs: dict[Any, Any] = {}, ) -> str: """Indexes an individual file using the passed arguments. diff --git a/src/unstract/sdk/llm.py b/src/unstract/sdk/llm.py index cbcd9c40..649ae538 100644 --- a/src/unstract/sdk/llm.py +++ b/src/unstract/sdk/llm.py @@ -31,7 +31,7 @@ def __init__( self, tool: BaseTool, adapter_instance_id: str, - usage_kwargs: dict[Any, Any] = None, + usage_kwargs: dict[Any, Any] = {}, ): """ diff --git a/src/unstract/sdk/prompt.py b/src/unstract/sdk/prompt.py index 8435c8c8..fa5fce5d 100644 --- a/src/unstract/sdk/prompt.py +++ b/src/unstract/sdk/prompt.py @@ -37,6 +37,9 @@ def answer_prompt(self, payload: dict[str, Any]) -> dict[str, Any]: def single_pass_extraction(self, payload: dict[str, Any]) -> dict[str, Any]: return self._post_call("single-pass-extraction", payload) + def summarize(self, payload: dict[str, Any]) -> dict[str, Any]: + return self._post_call("summarize", payload) + def _post_call(self, url_path: str, payload: dict[str, Any]) -> dict[str, Any]: """Invokes and communicates to prompt service to fetch response for the prompt.