get_num_tokens_from_messages will now estimate token consumption for images as described in OpenAI's documentation here.
Token usage information can now be toggled in streaming mode using the stream_usage parameter.
Invoke and streaming responses now include model version metadata. System fingerprint was also added to streaming.
Option to disable parallel tool calls (parallel_tool_calls) documented in API reference.
Misc improvements and bug fixes.
Commits:
openai: release 0.1.9 (#23263)
partners[minor]: Fix value error message for with_structured_output (#22877)
infra: add more formatter rules to openai (#23189)
openai[patch]: image token counting (#23147)
openai[patch], standard-tests[patch]: don't pass in falsey stop vals (#23153)
standard-tests[patch]: Update chat model standard tests (#22378)
openai[patch]: add stream_usage parameter (#22854)
[Partner]: Add metadata to stream response (#22716)
partners: fix numpy dep (#22858)
openai: add parallel_tool_calls to api ref (#22746)
openai[patch]: correct grammar in exception message in embeddings/base.py (#22629)
openai, azure: update model_name in ChatResult to use name from API response (#22569)
docs: update anthropic chat model (#22483)
openai: update ChatOpenAI api ref (#22324)
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 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 from 0.1.8 to 0.1.9.
Release notes
Sourced from langchain-openai's releases.
Commits
75c7c3a
openai: release 0.1.9 (#23263)abe7566
core[minor]: BaseChatModel with_structured_output implementation (#22859)360a70c
core[patch]: fix no current event loop for sql history in async mode (#22933)1c2b9cc
core[minor]: Update pgvector transalor for langchain_postgres (#23217)401d469
langchain: fix systax warning in create_json_chat_agent (#23253)b108b4d
core[patch]: set schema format for AsyncRootListenersTracer (#23214)976b456
docs: BaseChatModel key methods table (#23238)5da7eb9
docs[patch]: Update link (#23240)a7b4175
standard tests: add test for tool calling (#23234)12e0c28
docs: fix chat model methods table (#23233)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