pinecone-io / pinecone-ts-client

The official TypeScript/Node client for the Pinecone vector database
https://www.pinecone.io
Apache License 2.0
182 stars 38 forks source link

[Bug] v2.0.0 doesn't seem to work with serverless #194

Closed stephenkalnoske-sans closed 8 months ago

stephenkalnoske-sans commented 8 months ago

Is this a new bug?

Current Behavior

After reading the docs, when I pass along an API key in the Pinecone constructor, it yells at me and tells me it needs an environment. Using us-west-2 does not work as the environment. This is not talked about in any of the documentation.

Expected Behavior

It should work and query results.

Steps To Reproduce

Using the pinecone index.query method. and the new Pinecone({}) constructor.

Relevant log output

{
    "errorType": "PineconeConfigurationError",
    "errorMessage": "Since you called 'new Pinecone()' with no configuration object, we attempted to find client configuration in environment variables but the required environment variables were not set. Missing variables: PINECONE_ENVIRONMENT. You can find the configuration values for your project in the Pinecone developer console at https://app.pinecone.io"
......

Environment

- **OS**:
- **Language version**:
- **Pinecone client version**:

Additional Context

No response

christianlovescode commented 7 months ago

What was your solution here? Running into the same problem