diff --git a/src/unstract/sdk/__init__.py b/src/unstract/sdk/__init__.py index e297481a..8aab40ce 100644 --- a/src/unstract/sdk/__init__.py +++ b/src/unstract/sdk/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.31.0" +__version__ = "0.31.1" def get_sdk_version(): diff --git a/src/unstract/sdk/index.py b/src/unstract/sdk/index.py index 0e90ca2c..3c160a6f 100644 --- a/src/unstract/sdk/index.py +++ b/src/unstract/sdk/index.py @@ -401,7 +401,7 @@ def index_file( ) @deprecated( - "Deprecated class and method. Use Index and query_texy_from_index() instead" + "Deprecated class and method. Use Index and query_index() instead" ) def get_text_from_index( self, embedding_type: str, vector_db: str, doc_id: str diff --git a/src/unstract/sdk/prompt.py b/src/unstract/sdk/prompt.py index fa5fce5d..194e5dbd 100644 --- a/src/unstract/sdk/prompt.py +++ b/src/unstract/sdk/prompt.py @@ -2,7 +2,7 @@ from typing import Any, Optional import requests -from requests import ConnectionError, RequestException, Response, Timeout +from requests import ConnectionError, RequestException, Response from unstract.sdk.constants import LogLevel, PromptStudioKeys, ToolEnv from unstract.sdk.helper import SdkHelper @@ -68,7 +68,7 @@ def _post_call(self, url_path: str, payload: dict[str, Any]) -> dict[str, Any]: headers: dict[str, str] = {"Authorization": f"Bearer {self.bearer_token}"} response: Response = Response() try: - response = requests.post(url, json=payload, headers=headers, timeout=600) + response = requests.post(url, json=payload, headers=headers) response.raise_for_status() result["status"] = "OK" result["structure_output"] = response.text @@ -76,13 +76,6 @@ def _post_call(self, url_path: str, payload: dict[str, Any]) -> dict[str, Any]: msg = "Unable to connect to prompt service. Please contact admin." self._stringify_and_stream_err(connect_err, msg) result["error"] = msg - except Timeout as time_out: - msg = ( - "Request to run prompt has timed out. " - "Probable causes might be connectivity issues in LLMs." - ) - self._stringify_and_stream_err(time_out, msg) - result["error"] = msg except RequestException as e: # Extract error information from the response if available error_message = str(e)