DB-GPT icon indicating copy to clipboard operation
DB-GPT copied to clipboard

feat(model): Support tongyi embedding

Open zhenchaozhu opened this issue 1 year ago • 2 comments

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

zhenchaozhu avatar May 22 '24 02:05 zhenchaozhu

Thanks for your PR, great feature.

csunny avatar May 22 '24 11:05 csunny

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

csunny avatar May 24 '24 09:05 csunny

EMBEDDING_MODEL=proxy_tongyi
proxy_tongyi_proxy_backend=text-embedding-v1
proxy_tongyi_proxy_api_key={your-api-key}

Aries-ckt avatar Jun 25 '24 06:06 Aries-ckt

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?

chuangzhidan avatar Aug 14 '24 05:08 chuangzhidan