While using llama i am getting the error saying “No API key found for OpenAI”

from llama_index.evaluation import DatasetGenerator, QueryResponseEvaluator
from llama_index import (
    SimpleDirectoryReader,
    
    VectorStoreIndex,
    ServiceContext,
    LLMPredictor,
    Response,
)
from llama_index.llms import OpenAI
from pathlib import Path
from llama_index import download_loader

SimpleCSVReader = download_loader("SimpleCSVReader")

loader = SimpleCSVReader(encoding="utf-8")
documents = loader.load_data(file=Path('overview-of-recordings.csv'))

I am not using OpenAI still its asking api key

from docs

OpenAI Environment Setup

By default, we use the OpenAI gpt-3.5-turbo model for text generation
and text-embedding-ada-002 for retrieval and embeddings. In order to
use this, you must have an OPENAI_API_KEY setup.

Local Environment Setup

If you don’t wish to use OpenAI, the environment will automatically
fallback to using LlamaCPP and llama2-chat-13B for text generation and
BAAI/bge-small-en for retrieval and embeddings. This models will all
run locally.

In order to use LlamaCPP, follow the installation guide here. You’ll
need to install the llama-cpp-python package, preferably compiled to
support your GPU. This will use aronund 11.5GB of memory across the
CPU and GPU.

Leave a Comment