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

You haven't specified an API Key #107

Closed
rodrigo-pedro opened this issue Jan 22, 2024 · 1 comment · Fixed by #108
Closed

You haven't specified an API Key #107

rodrigo-pedro opened this issue Jan 22, 2024 · 1 comment · Fixed by #108

Comments

@rodrigo-pedro
Copy link

Running on master commit 99e2f44.

File "/venv/lib/python3.10/site-packages/rebuff/sdk.py", line 83, in detect_injection
self.initialize_pinecone()
File "/venv/lib/python3.10/site-packages/rebuff/sdk.py", line 40, in initialize_pinecone
self.vector_store = init_pinecone(
File "/venv/lib/python3.10/site-packages/rebuff/detect_pi_vectorbase.py", line 72, in init_pinecone
vector_store = Pinecone.from_existing_index(
File "/venv/lib/python3.10/site-packages/langchain_community/vectorstores/pinecone.py", line 462, in from_existing_index
pinecone_index = cls.get_pinecone_index(index_name, pool_threads)
File "/venv/lib/python3.10/site-packages/langchain_community/vectorstores/pinecone.py", line 369, in get_pinecone_index
pinecone_instance = pinecone.Pinecone(
File "/venv/lib/python3.10/site-packages/pinecone/control/pinecone.py", line 95, in init
self.config = PineconeConfig.build(api_key=api_key, host=host, additional_headers=additional_headers, **kwargs)
File "/venv/lib/python3.10/site-packages/pinecone/config/pinecone_config.py", line 12, in build
return ConfigBuilder.build(api_key=api_key, host=host, additional_headers=additional_headers, **kwargs)
File "/venv/lib/python3.10/site-packages/pinecone/config/config.py", line 45, in build
raise PineconeConfigurationError("You haven't specified an Api-Key.")
pinecone.exceptions.PineconeConfigurationError: You haven't specified an Api-Key.

My code:

rb = RebuffSdk(
openai_apikey=openai_apikey,
pinecone_apikey=pinecone_apikey,
pinecone_index=pinecone_index,
openai_model=openai_model
)

rb.detect_injection(prompt)

@ristomcgehee
Copy link
Collaborator

Thanks for surfacing another issue. PR to fix in #108.

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

Successfully merging a pull request may close this issue.

2 participants