Skip to content

Commit 46426b9

Browse files
committed
PR fix
1 parent 53694d6 commit 46426b9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

decart/realtime/client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,9 @@ def _emit_error(self, error: DecartSDKError) -> None:
7979
except Exception as e:
8080
logger.exception(f"Error in error callback: {e}")
8181

82-
async def set_prompt(self, prompt: str, enrich: bool = True, max_timeout: float = 15.0) -> None:
82+
async def set_prompt(self, prompt: str, enrich: bool = True) -> None:
8383
if not prompt or not prompt.strip():
8484
raise InvalidInputError("Prompt cannot be empty")
85-
if max_timeout <= 0 or max_timeout > 60:
86-
raise InvalidInputError("max_timeout must be between 0 and 60 seconds")
8785

8886
event, result = self._manager.register_prompt_wait(prompt)
8987

@@ -93,7 +91,7 @@ async def set_prompt(self, prompt: str, enrich: bool = True, max_timeout: float
9391
)
9492

9593
try:
96-
await asyncio.wait_for(event.wait(), timeout=max_timeout)
94+
await asyncio.wait_for(event.wait(), timeout=15.0)
9795
except asyncio.TimeoutError:
9896
raise DecartSDKError("Prompt acknowledgment timed out")
9997

0 commit comments

Comments
 (0)