Skip to content
Merged
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
6 changes: 4 additions & 2 deletions clients/python/llmengine/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
CompletionSyncV1Request,
)

COMPLETION_TIMEOUT = 300
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe most HTTPS connections break after ~60s. imo since it's also a sync endpoint, would it be better to lower this timeout and if the timeout is met, we can ask clients to try again later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the timeout between spellbookBackend -> Launch gateway to be 5 minutes, need to see if client -> spellbookBackend has a long enough timeout

do you know what usually controls how long it takes for HTTPS connections to break? wondering if it's something we can just set



class Completion(APIEngine):
"""
Expand All @@ -31,7 +33,7 @@ async def acreate(
temperature: float = 0.2,
stop_sequences: Optional[List[str]] = None,
return_token_log_probs: Optional[bool] = False,
timeout: int = 10,
timeout: int = COMPLETION_TIMEOUT,
stream: bool = False,
) -> Union[CompletionSyncResponse, AsyncIterable[CompletionStreamResponse]]:
"""
Expand Down Expand Up @@ -193,7 +195,7 @@ def create(
temperature: float = 0.2,
stop_sequences: Optional[List[str]] = None,
return_token_log_probs: Optional[bool] = False,
timeout: int = 10,
timeout: int = COMPLETION_TIMEOUT,
stream: bool = False,
) -> Union[CompletionSyncResponse, Iterator[CompletionStreamResponse]]:
"""
Expand Down