Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding batching feature for openAI #140

Open
MrTuanDao opened this issue Oct 7, 2024 · 2 comments
Open

Adding batching feature for openAI #140

MrTuanDao opened this issue Oct 7, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@MrTuanDao
Copy link

I believe the batching feature would be extremely beneficial, as we often crawl a large number of websites, which can lead to rate limits. Implementing batching would help manage this issue more effectively and improve overall efficiency.

@unclecode unclecode self-assigned this Oct 8, 2024
@unclecode unclecode added the enhancement New feature or request label Oct 8, 2024
@unclecode
Copy link
Owner

Hi, thank you so much for your suggestion. I think you're very right. It also brings down the cost as well. However, at the same time, we don't want to be overly dependent on a single specific AI provider. We aim to keep the library neutral or, essentially, LLM provider agnostic. To address this, one can create an create a class that inherits from the current LLMExtractionStrategy class. In that class, you can use OpenAI batching. By doing it this way, you can support OpenAI batching without reducing the generalization level of the library. I appreciate your interest in this. If you're willing, you could fork the repository, apply the changes, and send the pull request. We would add your batching as one of the utility classes so users can benefit from it. Please let me know if you are interested.

@MrTuanDao
Copy link
Author

MrTuanDao commented Oct 8, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants