Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ingest Error (previously working) #157

Closed
majumba opened this issue Apr 12, 2023 · 3 comments
Closed

Ingest Error (previously working) #157

majumba opened this issue Apr 12, 2023 · 3 comments

Comments

@majumba
Copy link

majumba commented Apr 12, 2023

Totally stumped as I have had this working fine before with no issues

When i try npm run ingest I am getting the following error:

// Prior to splitting the docs:

PineconeClient: Error getting project name: SyntaxError: Unexpected token A in JSON at position

// The docs are then split correctly and logged correctly.

creating vector store...
error [Error: PineconeClient: Project name not set. Call init() first.]
/Users/steven/gpt4-pdf-chatbot-langchain/scripts/ingest-data.ts:44
throw new Error('Failed to ingest your data');

Totally stumped and have spent the last few hours re-cloning the repo, rotating API keys, changing the index name to no avail. Hugely frustrating as I like i said it was working with no issues previously.

My environment is us-central1-gcp. The only thing i have not done is change the Pinecone environment as i do not think its worth the $70 to upgrade if it still does not work.

Any help would be super appreciated

Edit: I have upgraded my version of node to v19.9.0. And before the text splitting begins it gives the following error which provides a bit more insight but I still cannot get it to work:
PineconeClient: Error getting project name: SyntaxError: Unexpected token 'A', "API key is"... is not valid JSON

@majumba
Copy link
Author

majumba commented Apr 12, 2023

erhghh there is an issue with my dotenv package. Still have not quite worked it out but if i hardcode the api key it works... well that was frustrating.

API key is".

This is short for API is missing or invalid, in case anyway stumbles across this - updating to a more recent node version made this clearer

@DialloYoussouf
Copy link

DialloYoussouf commented Apr 13, 2023

Make a prompt to chatpgt: try this==>
I have this error : SyntaxError: Unexpected token A in JSON at position
With this code : paste your ingest-data.ts code here

You should get an answer

@majumba
Copy link
Author

majumba commented Apr 13, 2023

thanks. my stupid fault. i had set the pinecone api as a env variable in the shell and it was overriding the local project api key after i rotated the pinecone api key. frustrating but thankfully solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants