Git Product home page Git Product logo

Comments (3)

dosubot avatar dosubot commented on May 29, 2024 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:

  1. 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.

  1. 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.

  2. 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's env variable.

  3. Hardcode your API keys: If you're still facing issues, try hardcoding your API keys into the process.env variables.

  4. 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.

dosubot avatar dosubot commented on May 29, 2024 2

πŸ€–

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.

hendryman avatar hendryman commented on May 29, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.