canopy icon indicating copy to clipboard operation
canopy copied to clipboard

[Bug] Canopy cannot find the index created

Open sfdrada opened this issue 1 year ago • 2 comments

Is this a new bug?

  • [X] I believe this is a new bug
  • [X] I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

canopy start --index-name test-name Error: Failed to initialize Canopy server. Reason: The index canopy--first-pinecone does not exist or was deleted. Please create it by calling knowledge_base.create_canopy_index() or running the canopy new command

Expected Behavior

Expected the canopy start command to initialize the Canopy server with the specified index name without errors.

Steps To Reproduce

In the Canopy virtual environment. Using the config with specified index-name. Run canopy start --index-name canopy--todd-sergio. See error.

Relevant log output

No response

Environment

- **OS**:
- **Language version**:
- **Canopy version**:

Additional Context

i am not sure if there is a different way to reference this specific index, maybe by setting up a environment variable but setting the INDEX_NAME and PINECONE_ENVIRONMENT variables did not change it from asuming the default name. This index-name command did work however when upserting to the model which is why I was confused when it couldnt run to it

sfdrada avatar Feb 25 '24 17:02 sfdrada

@sfdrada thanks for the issue. I think it should be clearer in the docs but you should pass the index name without the canopy-- prefix. Both INDEX_NAME env variable and passing to canopy start as an argument should work as expected. Please let me know if it solves your issue.

izellevy avatar Feb 26 '24 13:02 izellevy

in my .env file i set the INDEX_NAME = "test-name" which is the same name as my index

Maybe passing in a name string or value makes it not work for directly referencing what index you want to use but referring to the index variable will work if you assign it to your index name.

canopy start --index-name test-name 🚨 Note 🚨 For debugging only. To run the Canopy server in production, please use Docker with a Gunicorn server. Error: Index name provided via --index-name 'test-name' does not match the index name provided via the INDEX_NAME environment variable 'first-pinecone'

canopy start --index-name "test-name" 🚨 Note 🚨 For debugging only. To run the Canopy server in production, please use Docker with a Gunicorn server. Error: Index name provided via --index-name 'test-name' does not match the index name provided via the INDEX_NAME environment variable 'first-pinecone'

canopy start --index-name %INDEX_NAME% 🚨 Note 🚨 For debugging only. To run the Canopy server in production, please use Docker with a Gunicorn server. Starting Canopy server on 0.0.0.0:8000 INFO: Started server process [19604] INFO: Waiting for application startup. 2024-02-26 14:01:01,078 - MainProcess - canopy_server.app [INFO ]: Did not find config file. Initializing engines with default configuration 2024-02-26 14:01:07,636 - MainProcess - httpx [INFO ]: HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK" INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)

sfdrada avatar Feb 26 '24 20:02 sfdrada