You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using JinaAIEmbedding as the embedding model in LlamaIndex 0.9.3, the script still throws an error requiring OPENAI_API_KEY. However, since OpenAI’s embeddings are not used, this should not be required.
To Reproduce
Code to reproduce the behavior:
import{JinaAIEmbedding,VectorStoreIndex,Document,Settings}from'llamaindex';// Configure JinaAIEmbeddingSettings.embedModel=newJinaAIEmbedding({apiKey: 'jina_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',// Dummy API Keymodel: 'jina-embeddings-v3',});asyncfunctiontestEmbedding(){try{constdoc=newDocument({text: "This is a test document."});constindex=awaitVectorStoreIndex.fromDocuments([doc]);console.log("Embedding created successfully.");}catch(error){console.error("Error:",error);}}testEmbedding();
Error:
The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).
Expected behavior
The script should work without requiring OPENAI_API_KEY since it only relies on JinaAIEmbedding, and I am not using any LLM.
Desktop (please complete the following information):
OS: macOS
JS Runtime / Framework / Bundler (select all applicable)
Node.js
Deno
Bun
Next.js
ESBuild
Rollup
Webpack
Turbopack
Vite
Waku
Edge Runtime
AWS Lambda
Cloudflare Worker
Others (please elaborate on this)
Version [e.g. 22]
Additional context
I am trying to use the package in a VSCode extension development environment.
The text was updated successfully, but these errors were encountered:
Describe the bug
When using JinaAIEmbedding as the embedding model in LlamaIndex 0.9.3, the script still throws an error requiring OPENAI_API_KEY. However, since OpenAI’s embeddings are not used, this should not be required.
To Reproduce
Code to reproduce the behavior:
Error:
Expected behavior
The script should work without requiring OPENAI_API_KEY since it only relies on JinaAIEmbedding, and I am not using any LLM.
Desktop (please complete the following information):
Additional context
I am trying to use the package in a VSCode extension development environment.
The text was updated successfully, but these errors were encountered: