diff --git a/.github/workflows/documentation_cookbook_tests.yml b/.github/workflows/documentation_cookbook_tests.yml index f0253c3918..b45e891cf4 100644 --- a/.github/workflows/documentation_cookbook_tests.yml +++ b/.github/workflows/documentation_cookbook_tests.yml @@ -43,6 +43,8 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install -U ipython nbconvert + - name: Install opik + run: pip install sdks/python - name: Prepare env variables run: | directory=$(dirname -- "${NOTEBOOK_TO_TEST}") diff --git a/sdks/python/src/opik/api_objects/opik_client.py b/sdks/python/src/opik/api_objects/opik_client.py index 4d9839e441..177af477c0 100644 --- a/sdks/python/src/opik/api_objects/opik_client.py +++ b/sdks/python/src/opik/api_objects/opik_client.py @@ -35,7 +35,7 @@ ) LOGGER = logging.getLogger(__name__) - +OPIK_API_REQUESTS_TIMEOUT_SECONDS = 5.0 class Opik: def __init__( @@ -90,6 +90,7 @@ def _initialize_streamer( base_url=base_url, httpx_client=httpx_client_, ) + self._rest_client._client_wrapper._timeout = OPIK_API_REQUESTS_TIMEOUT_SECONDS # See https://github.com/fern-api/fern/issues/5321 rest_client_configurator.configure(self._rest_client) self._streamer = streamer_constructors.construct_online_streamer( n_consumers=workers,