DB-GPT
DB-GPT copied to clipboard
feat(model): Support tongyi embedding
Description
Support tongyi embedding
How Has This Been Tested?
Test passed
Snapshots:
Include snapshots for easier review.
Checklist:
- [✔] My code follows the style guidelines of this project
- [✔] I have already rebased the commits and make the commit message conform to the project standard.
- [✔] I have performed a self-review of my own code
- [✔] I have commented my code, particularly in hard-to-understand areas
- [] I have made corresponding changes to the documentation
- [✔] Any dependent changes have been merged and published in downstream modules
Thanks for your PR, great feature.
File /DB-GPT/dbgpt/rag/embedding/embeddings.py", line 891, in embed_documents
| embeddings = resp["output"]["embeddings"]
| TypeError: 'NoneType' object is not subscriptable
How to set the .env config to test this? Please update .env.template for tongyi_proxy
EMBEDDING_MODEL=proxy_tongyi
proxy_tongyi_proxy_backend=text-embedding-v1
proxy_tongyi_proxy_api_key={your-api-key}
EMBEDDING_MODEL=proxy_tongyi proxy_tongyi_proxy_backend=text-embedding-v1 proxy_tongyi_proxy_api_key={your-api-key}
how to use this ,set those in .env?