mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-01 23:00:41 +00:00
Apply patch [skip ci]
This commit is contained in:
@@ -84,7 +84,7 @@ from langchain_core.runnables import (
|
||||
RunnableMap,
|
||||
RunnablePassthrough,
|
||||
)
|
||||
from langchain_core.runnables.config import run_in_executor
|
||||
from langchain_core.runnables.config import RunnableConfig, run_in_executor
|
||||
from langchain_core.tools import BaseTool
|
||||
from langchain_core.tools.base import _stringify
|
||||
from langchain_core.utils import get_pydantic_field_names
|
||||
@@ -100,7 +100,7 @@ from langchain_core.utils.pydantic import (
|
||||
from langchain_core.utils.utils import _build_model_kwargs, from_env, secret_from_env
|
||||
from pydantic import BaseModel, ConfigDict, Field, SecretStr, model_validator
|
||||
from pydantic.v1 import BaseModel as BaseModelV1
|
||||
from typing_extensions import Self
|
||||
from typing_extensions import Self, override
|
||||
|
||||
from langchain_openai.chat_models._client_utils import (
|
||||
_get_default_async_httpx_client,
|
||||
|
||||
@@ -48,7 +48,8 @@ class OpenAIBatchClient:
|
||||
and result retrieval.
|
||||
|
||||
This class provides a high-level interface to OpenAI's Batch API, which offers
|
||||
50% cost savings compared to the standard API in exchange for asynchronous processing.
|
||||
50% cost savings compared to the standard API in exchange for
|
||||
asynchronous processing.
|
||||
"""
|
||||
|
||||
def __init__(self, client: openai.OpenAI):
|
||||
@@ -182,7 +183,8 @@ class OpenAIBatchClient:
|
||||
# Check timeout
|
||||
if timeout and (time.time() - start_time) > timeout:
|
||||
raise BatchError(
|
||||
f"Batch {batch_id} timed out after {timeout} seconds. Current status: {status}",
|
||||
f"Batch {batch_id} timed out after {timeout} seconds. "
|
||||
f"Current status: {status}",
|
||||
batch_id=batch_id,
|
||||
status=status,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user