JinaEmbeddings
class utilizes the Jina API to generate embeddings for given text inputs. This guide will walk you through the setup and usage of the JinaEmbeddings
class, helping you integrate it into your project seamlessly.
@langchain/community
package as shown below:
JinaEmbeddings
class, you need an API token from Jina. You can pass this token directly to the constructor or set it as an environment variable (JINA_API_KEY
).
JinaEmbeddings
:
apiKey
is not provided, it will be read from the JINA_API_KEY
environment variable.
embedQuery
method:
embedDocuments
method.
JinaEmbeddings
class: