upgrade openai 1.3.5 to 1.6.0

This commit is contained in:
seehi 2023-12-21 11:47:29 +08:00
parent 97f156b10d
commit 1564b1bf14
2 changed files with 4 additions and 4 deletions

View file

@ -9,7 +9,6 @@ import json
import time
from typing import NamedTuple, Union
import httpx
from openai import (
APIConnectionError,
AsyncAzureOpenAI,
@ -18,6 +17,7 @@ from openai import (
AzureOpenAI,
OpenAI,
)
from openai._base_client import AsyncHttpxClientWrapper, SyncHttpxClientWrapper
from openai.types import CompletionUsage
from openai.types.chat import ChatCompletion, ChatCompletionChunk
from tenacity import (
@ -190,8 +190,8 @@ class OpenAIGPTAPI(BaseGPTAPI, RateLimiter):
# to use proxy, openai v1 needs http_client
proxy_params = self._get_proxy_params()
if proxy_params:
kwargs["http_client"] = httpx.Client(**proxy_params)
async_kwargs["http_client"] = httpx.AsyncClient(**proxy_params)
kwargs["http_client"] = SyncHttpxClientWrapper(**proxy_params)
async_kwargs["http_client"] = AsyncHttpxClientWrapper(**proxy_params)
return kwargs, async_kwargs

View file

@ -14,7 +14,7 @@ langchain==0.0.231
loguru==0.6.0
meilisearch==0.21.0
numpy==1.24.3
openai~=1.3
openai==1.6.0
openpyxl
beautifulsoup4==4.12.2
pandas==2.0.3