graphrag
graphrag copied to clipboard
Fixed an issue where base OpenAI embeddings can't work with Azure Ope…
Description
When you try to use base OpenAI embeddings with Azure OpenAI LLM deployment, you can index the document because hydrate_embeddings_params replaced None with Azure OpenAI base_url.
Related Issues
#492
Proposed Changes
This PR fixes the issues, such that all following event work as expected:
- same api_bases for LLM and embeddings (both Azure)
- different api_bases for LLM and embeddings (both Azure)
- LLM uses Azure OpenAI, while embeddings uses base OpenAI (this one is important)
- LLM uses Azure OpenAI, while embeddings uses third-party OpenAI-like API
Checklist
- [X] I have tested these changes locally.
- [x] I have reviewed the code changes.
- [ ] I have updated the documentation (if necessary).
- [ ] I have added appropriate unit tests (if applicable).
Additional Notes
[Add any additional notes or context that may be helpful for the reviewer(s).]