-
Notifications
You must be signed in to change notification settings - Fork 914
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
Error thrown when using node's fetch after version 4.12.2 #384
Comments
Thanks for reporting this, especially with a repro repo. We're looking into it. In the meantime, as a workaround, you might try |
I ran into the same issue. Downgrading to Edit to add: Thanks @rattrayalex for the quick response. ❤️ |
Thank you for confirming @benbalter and attempting the workaround! I've identified the issue and have a fix in flight. |
This will be released in #386 ! |
# Get localFileIngestion Script Running Just some minor changes to get the script running locally. Upgrade openai to 4.12.4 to resolve the readable stream type error (per openai/openai-node#384) My `.env` file has: ``` OPENAI_API_KEY= PINECONE_ENVIRONMENT=asia-southeast1-gcp-free PINECONE_API_KEY= ``` and I have a 'test' index in pinecone with default namespace. ``` ryanholinshead@Ryans-MacBook-Pro semantic-retrieval % npx ts-node examples/ingestion/localFileIngestion.ts {"id":"chatcmpl-8CevIMd377n4SDZiJ5EBoXDCAobN7","object":"chat.completion","created":1698027936,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"message":{"role":"assistant","content":"There is no specific expiration date for intelligence, as it is not something that can expire like a product or a document. However, intelligence can change and adapt over time depending on factors such as age, education, and life experiences. While some aspects of intelligence may peak during certain stages of life, such as fluid intelligence in early adulthood, other types of intelligence, such as crystallized intelligence, can continue to develop and improve throughout a person's lifetime. Additionally, it is important to recognize that intelligence is a complex and multifaceted concept that cannot be fully captured by a single measure or test."},"finish_reason":"stop"}],"usage":{"prompt_tokens":7,"completion_tokens":119,"total_tokens":126}} ryanholinshead@Ryans-MacBook-Pro semantic-retrieval % ``` Completion works and I checked the pinecone index to see embeddings inserted into it
# Get localFileIngestion Script Running Just some minor changes to get the script running locally. Upgrade openai to 4.12.4 to resolve the readable stream type error (per openai/openai-node#384) My `.env` file has: ``` OPENAI_API_KEY= PINECONE_ENVIRONMENT=asia-southeast1-gcp-free PINECONE_API_KEY= ``` and I have a 'test' index in pinecone with default namespace. ``` ryanholinshead@Ryans-MacBook-Pro semantic-retrieval % npx ts-node examples/ingestion/localFileIngestion.ts {"id":"chatcmpl-8CevIMd377n4SDZiJ5EBoXDCAobN7","object":"chat.completion","created":1698027936,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"message":{"role":"assistant","content":"There is no specific expiration date for intelligence, as it is not something that can expire like a product or a document. However, intelligence can change and adapt over time depending on factors such as age, education, and life experiences. While some aspects of intelligence may peak during certain stages of life, such as fluid intelligence in early adulthood, other types of intelligence, such as crystallized intelligence, can continue to develop and improve throughout a person's lifetime. Additionally, it is important to recognize that intelligence is a complex and multifaceted concept that cannot be fully captured by a single measure or test."},"finish_reason":"stop"}],"usage":{"prompt_tokens":7,"completion_tokens":119,"total_tokens":126}} ryanholinshead@Ryans-MacBook-Pro semantic-retrieval % ``` Completion works and I checked the pinecone index to see embeddings inserted into it
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
See two commits in https://github.com/thhermansen/openai-node-fetch/commits/main
which in essence consists of a rather small program:
It works fine with openai 4.12.1, but breaks in 4.12.2 where you get an error thrown:
The issue is maybe related to 71984ed
To Reproduce
Clone https://github.com/thhermansen/openai-node-fetch and run the code :)
Code snippets
No response
OS
MacOS
Node version
20.8.1
Library version
4.12.1, 4.12.2, 4.12.3
The text was updated successfully, but these errors were encountered: