Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 1, 2025

Bumps langchain-openai from 0.2.14 to 0.3.3.

Release notes

Sourced from langchain-openai's releases.

langchain-openai==0.3.3

Changes since langchain-openai==0.3.2

partners/openai: release 0.3.3 (#29490) multiple: structured output tracing standard metadata (#29421)

langchain-openai==0.3.2

Changes since langchain-openai==0.3.1

openai[patch]: fix int test (#29395) openai[patch]: detect old models in with_structured_output (#29392) Community: fix missing f-string modifier in oai structured output parsing error (#29326)

langchain-openai==0.3.1

Changes since langchain-openai==0.3.0

openai[patch]: fix Azure LLM test (#29302) openai[patch]: release 0.3.1 (#29301) anthropic[patch]: support parallel_tool_calls (#29257) docs: oai api ref nit (#29210) openai: disable streaming for o1 by default (#29147) docs: Update openai README.md (#29146)

langchain-openai==0.3.0

langchain-openai==0.3 implements two breaking changes:

Structured output

We update the default method parameter for ChatOpenAI(...).with_structured_output(method=<method>) from method="function_calling" to method="json_schema".

For schemas specified via TypedDict or JSON schema, strict schema validation is disabled by default but can be enabled by specifying strict=True.

Note: conceptually there is a difference between forcing a tool call and forcing a response format. Tool calls may have more concise arguments versus generating content adhering to a schema. Prompts may need to be adjusted to recover desired behavior.

How to retain the 0.2 with_structured_output behavior after upgrading to 0.3

To change this behavior back, you can pass method="function_calling" to your with_structured_output calls that you want to switch the behavior back.

Expected errors

  1. Models that don’t support method="json_schema" (e.g., gpt-4 and gpt-3.5-turbo, currently the default model for ChatOpenAI) will raise an error unless method is explicitly specified. To recover the previous default, pass method="function_calling" into with_structured_output.

  2. Schemas specified via Pydantic BaseModel that have fields with non-null defaults or metadata (like min/max constraints) will raise an error. To recover the previous default, pass method="function_calling" into with_structured_output. See OpenAI's docs for supported schemas.

Optional parameters

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [langchain-openai](https://github.com/langchain-ai/langchain) from 0.2.14 to 0.3.3.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](langchain-ai/langchain@langchain-openai==0.2.14...langchain-openai==0.3.3)

---
updated-dependencies:
- dependency-name: langchain-openai
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added automated pr dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Feb 1, 2025
@dependabot dependabot bot requested a review from lpm0073 February 1, 2025 03:46
@mergify mergify bot merged commit d24f4dc into main Feb 1, 2025
2 checks passed
@dependabot dependabot bot deleted the dependabot/pip/api/terraform/python/layer_langchain/langchain-openai-0.3.3 branch February 1, 2025 03:48
@lpm0073
Copy link
Member

lpm0073 commented Feb 1, 2025

🎉 This PR is included in version 0.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated pr dependencies Pull requests that update a dependency file python Pull requests that update Python code released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants