mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-12 12:59:07 +00:00
all: test 3.13 ci (#27197)
Co-authored-by: Bagatur <baskaryan@gmail.com> Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
This commit is contained in:
@@ -6,7 +6,7 @@ from langchain_community.adapters import openai as lcopenai
|
||||
def _test_no_stream(**kwargs: Any) -> None:
|
||||
import openai
|
||||
|
||||
result = openai.ChatCompletion.create(**kwargs)
|
||||
result = openai.ChatCompletion.create(**kwargs) # type: ignore[attr-defined]
|
||||
lc_result = lcopenai.ChatCompletion.create(**kwargs)
|
||||
if isinstance(lc_result, dict):
|
||||
if isinstance(result, dict):
|
||||
@@ -20,7 +20,7 @@ def _test_stream(**kwargs: Any) -> None:
|
||||
import openai
|
||||
|
||||
result = []
|
||||
for c in openai.ChatCompletion.create(**kwargs):
|
||||
for c in openai.ChatCompletion.create(**kwargs): # type: ignore[attr-defined]
|
||||
result.append(c["choices"][0]["delta"].to_dict_recursive())
|
||||
|
||||
lc_result = []
|
||||
@@ -32,7 +32,7 @@ def _test_stream(**kwargs: Any) -> None:
|
||||
async def _test_async(**kwargs: Any) -> None:
|
||||
import openai
|
||||
|
||||
result = await openai.ChatCompletion.acreate(**kwargs)
|
||||
result = await openai.ChatCompletion.acreate(**kwargs) # type: ignore[attr-defined]
|
||||
lc_result = await lcopenai.ChatCompletion.acreate(**kwargs)
|
||||
if isinstance(lc_result, dict):
|
||||
if isinstance(result, dict):
|
||||
@@ -46,7 +46,7 @@ async def _test_astream(**kwargs: Any) -> None:
|
||||
import openai
|
||||
|
||||
result = []
|
||||
async for c in await openai.ChatCompletion.acreate(**kwargs):
|
||||
async for c in await openai.ChatCompletion.acreate(**kwargs): # type: ignore[attr-defined]
|
||||
result.append(c["choices"][0]["delta"].to_dict_recursive())
|
||||
|
||||
lc_result = []
|
||||
|
Reference in New Issue
Block a user