gusye1234 / nano-graphrag

A simple, easy-to-hack GraphRAG implementation
MIT License
1.7k stars 164 forks source link

有没有超时参数可以设置? 我发现一旦超时就死在哪里,既不会重试也不会退出 #36

Closed luckfu closed 1 month ago

luckfu commented 2 months ago
File "/data/miniconda3/lib/python3.10/site-packages/openai/resources/chat/completions.py", line 1295, in create
    return await self._post(
  File "/data/miniconda3/lib/python3.10/site-packages/openai/_base_client.py", line 1836, in post
    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
  File "/data/miniconda3/lib/python3.10/site-packages/openai/_base_client.py", line 1524, in request
    return await self._request(
  File "/data/miniconda3/lib/python3.10/site-packages/openai/_base_client.py", line 1610, in _request
    return await self._retry_request(
  File "/data/miniconda3/lib/python3.10/site-packages/openai/_base_client.py", line 1657, in _retry_request
    return await self._request(
  File "/data/miniconda3/lib/python3.10/site-packages/openai/_base_client.py", line 1610, in _request
    return await self._retry_request(
  File "/data/miniconda3/lib/python3.10/site-packages/openai/_base_client.py", line 1657, in _retry_request
    return await self._request(
  File "/data/miniconda3/lib/python3.10/site-packages/openai/_base_client.py", line 1582, in _request
    raise APITimeoutError(request=request) from err
openai.APITimeoutError: Request timed out.
buchikeke commented 2 months ago

openai_async_client = AsyncOpenAI( api_key=DEEPSEEK_API_KEY, base_url="*******",timeout=90.0, )