Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

[Bug] Canopy cannot find the index created #305

Open
2 tasks done
sfdrada opened this issue Feb 25, 2024 · 2 comments
Open
2 tasks done

[Bug] Canopy cannot find the index created #305

sfdrada opened this issue Feb 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sfdrada
Copy link

sfdrada commented Feb 25, 2024

Is this a new bug?

  • I believe this is a new bug
  • 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 sfdrada added the bug Something isn't working label Feb 25, 2024
@izellevy
Copy link
Collaborator

@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 izellevy changed the title [Bug] <title> [Bug] Canopy cannot find the index created Feb 26, 2024
@sfdrada
Copy link
Author

sfdrada commented Feb 26, 2024

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 sfdrada closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
@sfdrada sfdrada reopened this Feb 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants