camel
camel copied to clipboard
feat: add batch api
Description
This update introduces batch API functionality to openai_model.py, accompanied by a relevant example. The batch API enables users to process multiple requests simultaneously, improving efficiency and reducing costs by up to 50% compared to individual API calls. This is particularly beneficial for large-scale data processing tasks that are not time-sensitive.
#1546
Checklist
Please review the following items and mark them with an x where applicable.
- [x] I have read the [CONTRIBUTION](https://github.com/camel-ai/camel/blob/master/CONTRIBUTING.md) guide (required)
- [x] I have linked this PR to an issue using the Development section on the right sidebar or by adding
Fixes #issue-numberin the PR description (required) - [x] I have checked if any dependencies need to be added or updated in
pyproject.tomlandpoetry.lock - [ ] I have updated the tests accordingly (required for a bug fix or a new feature)
- [ ] I have updated the documentation if needed
- [x] I have added examples if this is a new feature