Comments (3)
π€
Hey @hendryman, good to see you back! Running into a bit of a snag, I see? Let's get that sorted.
The error you're encountering seems to be related to the OpenAI API key configuration. Here are some steps you can take to resolve this issue:
- Verify your
.env
file: Ensure that you have copied.env.example
into.env
and filled in the necessary details. Your.env
file should look like this:
OPENAI_API_KEY=<your_openai_api_key>
PINECONE_API_KEY=<your_pinecone_api_key>
PINECONE_ENVIRONMENT=<your_pinecone_environment>
PINECONE_INDEX_NAME=<your_pinecone_index_name>
Replace <your_openai_api_key>
, <your_pinecone_api_key>
, <your_pinecone_environment>
, and <your_pinecone_index_name>
with your actual keys and details.
-
Check your OpenAI API key: Visit openai to retrieve your API keys and insert them into your
.env
file. Make sure the key is valid and working. -
Check for multiple OpenAI keys: Ensure that you don't have multiple OpenAI keys in your global environment. If you do, the local
env
file from the project will be overwritten by the system'senv
variable. -
Hardcode your API keys: If you're still facing issues, try hardcoding your API keys into the
process.env
variables. -
Check your OpenAI credits: Make sure you have enough OpenAI credits and a valid card on your billing account.
If you've checked all these and the issue persists, it might be a problem with the OpenAI API itself or the way it's being used in the code. In that case, you might need to check the code where the API is being used or contact OpenAI support for further assistance.
For more information, you can refer to the README.md and .env.example files in the repository.
Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a π if this is helpful and π if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
from gpt4-pdf-chatbot-langchain.
π€
The error you're encountering seems to be related to the OpenAIEmbeddings
class, which is used in the gpt4-pdf-chatbot-langchain
codebase to generate embeddings for the text data. These embeddings are vector representations of the text data that can be used for various machine learning tasks.
However, since you mentioned that you don't use Azure OpenAI API, you might want to replace the OpenAIEmbeddings
with another embeddings generator that doesn't rely on Azure OpenAI API.
Unfortunately, without the implementation details of the OpenAIEmbeddings
class and other alternatives, I can't provide a specific solution. You might need to look into the documentation or source code of the 'langchain/embeddings/openai' module to find out how to replace or bypass the Azure OpenAI API usage.
If the OpenAIEmbeddings
class is not essential for your use case, you could potentially comment out or remove the related lines:
// const embeddings = new OpenAIEmbeddings();
// await PineconeStore.fromDocuments(docs, embeddings, {
// pineconeIndex: index,
// namespace: PINECONE_NAME_SPACE,
// textKey: 'text',
// });
Please note that this will likely affect the functionality of your application, as the embeddings won't be generated and stored. You should replace these lines with an alternative way of generating and storing embeddings that fits your needs.
You can find these lines in the scripts/ingest-data.ts file.
I hope this helps! If you have any other questions or need further clarification, feel free to ask.
Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a π if this is helpful and π if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
from gpt4-pdf-chatbot-langchain.
@dosu-bot that does not solve my problem. The problem is an error with a "Azure OpenAI API instance name" - I don't use the Azure OpenAI API...
from gpt4-pdf-chatbot-langchain.
Related Issues (20)
- Does the new GPTs release from openAI remove the need for this kind of work? HOT 3
- Is there a javascript version of this repo? HOT 3
- how do i ssl? HOT 3
- Conversion of code into Python HOT 2
- PineconeError: Error, message length too large: found 5453452 bytes, the limit is: 4194304 bytes HOT 6
- source output HOT 1
- How to include more than 4 results from Pinecone? HOT 3
- How to change the BaseUrl if I use a proxy HOT 1
- Can ChatGPT 3.5 be supportedοΌ HOT 6
- Text words overlay display HOT 1
- Does this project accepts image read from PDF? HOT 5
- Enhancement - ability to use a graph database such as neo4j instead of vector database HOT 1
- enhancement - integrate with llamaindex HOT 3
- Explain data ingestion code. HOT 4
- s HOT 1
- "TypeError: Cannot read properties of undefined (reading 'text')" HOT 1
- error TypeError: ids is not iterable HOT 1
- Add support for Pinecone Serverless HOT 7
- FetchError: request to https://api.openai.com/v1/embeddings failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt4-pdf-chatbot-langchain.