The batch method from ChatModels and all the Runnables does not really support the OpenAI batch API.
### Checked other resources - [X] I added a very descriptive title to this issue. - [X] I searched the LangChain documentation with the integrated search. - [X] I used the GitHub search to find a similar question and didn't find it. - [X] I am sure that this is a bug in LangChain rather than my code. - [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). ### Example Code The chatmodel.batch method does not really use the Openai batch API. And there is not any other method which does it. The batch API is 50% cheaper than the normal API as exchange of waiting for them to do it asynchronously. When you don't need real-time results this becomes quite handy. Additionally, other providers are starting to implement something similar. So it will probably become a standard. A lot of people want this actually see #21643. ### Error Message and Stack Trace (if applicable) _No response_ ### Description When i use the chatmodel.batch method I expect to receive a batchid given by the openai API, so that later I can get the predictions when they are done though any other method. What ends up happening is that instead of invoking the batch API, it invokes the sync API. Afeter few time I receive the results from the syc API and end up paying the same. What I would like to happen is that I have a method which gives me the identifier, I store the identifier, and with other rutine I ask for the results and run t
Posted by chriss1245 on Dec 4, 2024, 10:40 AM
Tags
Related issues
- Add 65536 size support for maps
- TypeScript 7.1 Iteration Plan
- nvim-treeconfig: upstream nvim-treesitter
- Add the "action" and "method" attributes to <button>
- [FEATURE] Support multiple Connector accounts (same connector, different accounts) in Claude and Claude Code on the web (claude.ai/code)
- > We were imposed GitHub for so many exercises!
Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments
support (Software)
Add 65536 size support for maps
TypeScript 7.1 Iteration Plan
nvim-treeconfig: upstream nvim-treesitter
Add the "action" and "method" attributes to <button>
[FEATURE] Support multiple Connector accounts (same connector, different accounts) in Claude and Claude Code on the web (claude.ai/code)
> We were imposed GitHub for so many exercises!
Add support for Visual Studio 2026 Integration
Support for Helm v4
The batch method from ChatModels and all the Runnables does not really support the OpenAI batch API.
### Checked other resources - [X] I added a very descriptive title to this issue. - [X] I searched the LangChain documentation with the integrated search. - [X] I used the GitHub search to find a similar question and didn't find it. - [X] I am sure that this is a bug in LangChain rather than my code. - [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). ### Example Code The chatmodel.batch method does not really use the Openai batch API. And there is not any other method which does it. The batch API is 50% cheaper than the normal API as exchange of waiting for them to do it asynchronously. When you don't need real-time results this becomes quite handy. Additionally, other providers are starting to implement something similar. So it will probably become a standard. A lot of people want this actually see #21643. ### Error Message and Stack Trace (if applicable) _No response_ ### Description When i use the chatmodel.batch method I expect to receive a batchid given by the openai API, so that later I can get the predictions when they are done though any other method. What ends up happening is that instead of invoking the batch API, it invokes the sync API. Afeter few time I receive the results from the syc API and end up paying the same. What I would like to happen is that I have a method which gives me the identifier, I store the identifier, and with other rutine I ask for the results and run t
Comments (0)
No comments yet. Start the discussion.