本页还没有译文
本页 9 段还没译成Español,下面显示的是英文原文。Nomic integration
还没翻译译自英文(docs.langchain.com)本页 9 段都还没译
The NomicEmbeddings class uses the Nomic AI API to generate embeddings for a given text.
Setup
In order to use the Nomic API you'll need to sign up for a Nomic account and create an API key.
You'll first need to install the @langchain/nomic package:
npm install @langchain/nomic @langchain/coreUsage
import { NomicEmbeddings } from "@langchain/nomic";
/* Embed queries */
const nomicEmbeddings = new NomicEmbeddings();
const res = await nomicEmbeddings.embedQuery("Hello world");
console.log(res);
/* Embed documents */
const documentRes = await nomicEmbeddings.embedDocuments([
"Hello world",
"Bye bye",
]);
console.log(documentRes);Related
- Embedding model conceptual guide
- Embedding model how-to guides
AI 翻译查看英文原文