Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/unstract/sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.28.0"
__version__ = "0.29.0"


def get_sdk_version():
Expand Down
2 changes: 1 addition & 1 deletion src/unstract/sdk/embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/unstract/sdk/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion src/unstract/sdk/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
self,
tool: BaseTool,
adapter_instance_id: str,
usage_kwargs: dict[Any, Any] = None,
usage_kwargs: dict[Any, Any] = {},
):
"""

Expand Down
3 changes: 3 additions & 0 deletions src/unstract/sdk/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down