TencentHunyuanEmbeddings
class uses the Tencent Hunyuan API to generate embeddings for a given text.
Setup
- Sign up for a Tencent Cloud account here.
- Create SecretID & SecretKey here.
- Set SecretID and SecretKey as environment variables named
TENCENT_SECRET_ID
andTENCENT_SECRET_KEY
, respectively.
npm
npm
web
as shown below.
Usage
Here’s an example:Related
- Embedding model conceptual guide
- Embedding model how-to guides