Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions launch/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
from launch.request_validation import validate_task_request

DEFAULT_NETWORK_TIMEOUT_SEC = 120
LLM_COMPLETIONS_TIMEOUT = 300

logger = logging.getLogger(__name__)
logging.basicConfig()
Expand Down Expand Up @@ -2945,6 +2946,7 @@ def completions_sync(
body=request,
query_params=query_params,
skip_deserialization=True,
timeout=LLM_COMPLETIONS_TIMEOUT,
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be a param passed in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah lemme do that actually

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made timeout optionally configurable

)
resp = json.loads(response.response.data)
return resp
Expand Down Expand Up @@ -2989,6 +2991,7 @@ def completions_stream(
json=request,
auth=(self.configuration.username, self.configuration.password),
stream=True,
timeout=LLM_COMPLETIONS_TIMEOUT,
)
sse_client = sseclient.SSEClient(response)
events = sse_client.events()
Expand Down