Closed solo2424 closed 1 year ago
I figured out my issues. I was using an .env file from a different project and didn't realize the api env syntex was a little different.
PINECONE_ENV=northamerica-northeast1-gcp => PINECONE_API_ENV=northamerica-northeast1-gcp
Is there a way to change the pinecone environment? I am getting the following error. My pinecone API env is set to northamerica-northeast1-gcp but as you can see in the error code, it is trying to use "us-west1-gcp". I can not seem to change it to west in the pinecone console, so I beleive I have to set it within Teenage-AGI. Anyone know how to do this? I did add the correct enviornment in the .evn file. Also see below/
.env
OPENAI_API_BASE_URL=https://api.openai.com/v1 OPENAI_API_KEY=**** PINECONE_API_KEY=**** PINECONE_ENV=northamerica-northeast1-gcp ELEVENLABS_API_KEY=**** ELEVENLABS_VOICE_2_ID=generated/Liam SMART_LLM_MODEL=gpt-4 FAST_LLM_MODEL=gpt-3.5-turbo GOOGLE_API_KEY=**** CUSTOM_SEARCH_ENGINE_ID=c772991b1d7c24133 USE_AZURE=False OPENAI_AZURE_API_BASE=your-base-url-for-azure OPENAI_AZURE_API_VERSION=api-version-for-azure OPENAI_AZURE_DEPLOYMENT_ID=deployment-id-for-azure OPENAI_AZURE_CHAT_DEPLOYMENT_ID=deployment-id-for-azure-chat OPENAI_AZURE_EMBEDDINGS_DEPLOYMENT_ID=deployment-id-for-azure-embeddigs IMAGE_PROVIDER=sd HUGGINGFACE_API_TOKEN=**** USE_MAC_OS_TTS=False MEMORY_BACKEND=pinecone
Error
(venv) C:\Users\jerem\Teenage-AGI> (venv) C:\Users\jerem\Teenage-AGI>python main.py [nltk_data] Downloading package punkt to [nltk_data] C:\Users\jerem\AppData\Roaming\nltk_data... [nltk_data] Package punkt is already up-to-date! Traceback (most recent call last): File "C:\Users\jerem\Teenage-AGI\main.py", line 14, in
agent.createIndex()
File "C:\Users\jerem\Teenage-AGI\agent.py", line 100, in createIndex
if self.table_name not in pinecone.list_indexes():
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\manage.py", line 185, in list_indexes
response = api_instance.list_indexes()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api_client.py", line 776, in call
return self.callable(self, *args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api\index_operations_api.py", line 1132, in __list_indexes
return self.call_with_http_info(kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api_client.py", line 838, in call_with_http_info
return self.api_client.call_api(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api_client.py", line 413, in call_api
return self.__call_api(resource_path, method,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api_client.py", line 207, in call_api
raise e
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api_client.py", line 200, in call_api
response_data = self.request(
^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api_client.py", line 439, in request
return self.rest_client.GET(url,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\rest.py", line 236, in GET
return self.request("GET", url,
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\rest.py", line 219, in request
raise UnauthorizedException(http_resp=r)
pinecone.core.client.exceptions.UnauthorizedException: (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'www-authenticate': 'API key is missing or invalid for the environment "us-west1-gcp". Check that the correct environment is specified.', 'content-length': '114', 'date': 'Sat, 29 Apr 2023 13:11:44 GMT', 'server': 'envoy'})
HTTP response body: API key is missing or invalid for the environment "us-west1-gcp". Check that the correct environment is specified.