logancyang / obsidian-copilot

THE Copilot in Obsidian
https://www.obsidiancopilot.com/
GNU Affero General Public License v3.0
2.98k stars 207 forks source link

Add Request Limitation for Embedding Models #633

Open 2slow4u opened 1 month ago

2slow4u commented 1 month ago

Is your feature request related to a problem? Please describe. When trying to index and embedd a large vault through the selected embedding model - in my case Azure OpenAI - I run into HTTP 429 Errors, which are indicating that the Rate Limit kicked in on the embedding model. I maxed out the Quota on Azure OpenAI but still getting it.

Describe the solution you'd like In order to avoid HTTP 429 Errors, it would be great to introduce an option to rate limit the number of request for the embedding creation.

Describe alternatives you've considered Additionally there may be an option that influences the ramp up speed to the max limit of embedding requests in order to warm up the model and avoid through this the HTTP 429 Error.

Additional context It would be great to extend the configurability on the vector store, e.g. chunking size, overlap, etc. That helps to experiment a little bit with the retrieval quality.

logancyang commented 1 month ago

Right, a setting that throttles the embedding request is needed.