From 6b249a0dc24a486fb9dac76e1de7c7847933c3d6 Mon Sep 17 00:00:00 2001 From: ccurme Date: Sun, 19 Jan 2025 12:04:00 -0500 Subject: [PATCH 1/2] openai[patch]: release 0.3.1 (#29301) --- libs/partners/openai/poetry.lock | 6 +++--- libs/partners/openai/pyproject.toml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/partners/openai/poetry.lock b/libs/partners/openai/poetry.lock index 85b65dbf801a6..41b8b1e48f15b 100644 --- a/libs/partners/openai/poetry.lock +++ b/libs/partners/openai/poetry.lock @@ -496,7 +496,7 @@ files = [ [[package]] name = "langchain-core" -version = "0.3.29" +version = "0.3.30" description = "Building applications with LLMs through composability" optional = false python-versions = ">=3.9,<4.0" @@ -521,7 +521,7 @@ url = "../../core" [[package]] name = "langchain-tests" -version = "0.3.7" +version = "0.3.8" description = "Standard tests for LangChain implementations" optional = false python-versions = ">=3.9,<4.0" @@ -1647,4 +1647,4 @@ watchmedo = ["PyYAML (>=3.10)"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "0bc715ae349e68aa13cce7541210fb9596a6a66a9a5479fdc5c891c79ca11688" +content-hash = "7b96bca67aad51e85bdceb9b491b834bc036aa20da766b999d2c3e2df8e64ae1" diff --git a/libs/partners/openai/pyproject.toml b/libs/partners/openai/pyproject.toml index 77ef40180e498..8f80837ac36f5 100644 --- a/libs/partners/openai/pyproject.toml +++ b/libs/partners/openai/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "langchain-openai" -version = "0.3.0" +version = "0.3.1" description = "An integration package connecting OpenAI and LangChain" authors = [] readme = "README.md" @@ -23,7 +23,7 @@ ignore_missing_imports = true [tool.poetry.dependencies] python = ">=3.9,<4.0" -langchain-core = "^0.3.29" +langchain-core = "^0.3.30" openai = "^1.58.1" tiktoken = ">=0.7,<1" From c20f7418c76e99db72706af0a6ca11cfcf7f7b09 Mon Sep 17 00:00:00 2001 From: ccurme Date: Sun, 19 Jan 2025 12:25:42 -0500 Subject: [PATCH 2/2] openai[patch]: fix Azure LLM test (#29302) The tokens I get are: ``` ['', '\n\n', 'The', ' sun', ' was', ' setting', ' over', ' the', ' horizon', ',', ' casting', ''] ``` so possibly an extra empty token is included in the output. lmk @efriis if we should look into this further. --- .../openai/tests/integration_tests/llms/test_azure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/partners/openai/tests/integration_tests/llms/test_azure.py b/libs/partners/openai/tests/integration_tests/llms/test_azure.py index 4ae9d2900d4a3..fcbc6b3b0aafa 100644 --- a/libs/partners/openai/tests/integration_tests/llms/test_azure.py +++ b/libs/partners/openai/tests/integration_tests/llms/test_azure.py @@ -148,7 +148,7 @@ def test_openai_streaming_callback() -> None: verbose=True, ) llm.invoke("Write me a sentence with 100 words.") - assert callback_handler.llm_streams == 11 + assert callback_handler.llm_streams == 12 @pytest.mark.scheduled @@ -171,5 +171,5 @@ async def test_openai_async_streaming_callback() -> None: verbose=True, ) result = await llm.agenerate(["Write me a sentence with 100 words."]) - assert callback_handler.llm_streams == 11 + assert callback_handler.llm_streams == 12 assert isinstance(result, LLMResult)