Commit 8c6ee33
authored
fix: Support custom models in openai text embedder (#5525)
## Changes Made
Currently the openai text embedder asserts that the model must be an
openai model, however this does not work if user passes in a custom
BASE_URL that routes to an openai compatible server of a open source
model like qwen.
This PR elides the model check if user passes in BASE_URL, and also
allows user to pass in custom `embedding_dimensions`
## Related Issues
<!-- Link to related GitHub issues, e.g., "Closes #123" -->
## Checklist
- [ ] Documented in API Docs (if applicable)
- [ ] Documented in User Guide (if applicable)
- [ ] If adding a new documentation page, doc is added to
`docs/mkdocs.yml` navigation
- [ ] Documentation builds and is formatted properly1 parent c950538 commit 8c6ee33
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
0 commit comments