Pip install open-ai-secret-manager not working

Hi everyone :slight_smile:

I am trying to install openai-secret-manager , but it is not working.

I have upgraded pip to the latest version, and I am using python 3.9.13.

Does anyone know what I should do ?

1 Like

Hello Brother,
Alternatively, you can manually set your API key for the ChatGPT service by replacing the following lines of code:

import openai_secret_manager

assert "chatgpt" in openai_secret_manager.get_services()
secrets = openai_secret_manager.get_secrets("chatgpt")

print(secrets)

import openai
openai.api_key = secrets["api_key"]

with the following:

import openai

# replace YOUR_API_KEY with your actual API key for the ChatGPT service
openai.api_key = "YOUR_API_KEY"

3 Likes

ChatGPT sometimes makes up python libraries that aren’t there. Visit pypi.org and type in “openai_secret_manager” to verify.

2 Likes

same problem here too, there is no library like that.
Here AI trying to add a key for API I think. Just add your key as openai.api_key like above.

I assume we are all here because we asked ChatGPT to write code that uses the ChatGPT API? that’s what I’m here for and im about at basic as it comes with this sort of thing.

GPTs response …

I apologize for the confusion. It seems that the openai_secret_manager package is not an official package from OpenAI, but rather a package created by a third-party developer to help manage OpenAI API keys.

If you prefer to use this package, you can download the package code from GitHub and install it using pip. Here are the steps to do so:

  1. Download the openai_secret_manager package code from GitHub by going to the following link: https://github.com/pablocarb/openai-secret-manager
  2. Click the “Code” button and select “Download ZIP”. This will download the package code to your computer.
  3. Unzip the downloaded package code and navigate to the unzipped directory.
  4. Open a terminal or command prompt and navigate to the unzipped directory.
  5. Install the package using pip by running the following command: pip install .
  6. Once the installation is complete, you can import the openai_secret_manager package in your Python code using the following statement:
1 Like

Did you find https://github.com/pablocarb/openai-secret-manager by any chance?

When I click on it, it says Page not found.

I also get an error in “import openai_secret_manager” with python. Is there any other solution?

1 Like

type “pip list” and check openai version higher than 0.8.0

The openai_secret_manager module was added to the openai package in version 0.9.0. If you have openai version 0.8.0, it might not have the openai_secret_manager module.

To fix this issue, you can upgrade the openai package to the latest version, which should include the openai_secret_manager module. You can do this by running the following command in your terminal:

pip install --upgrade openai

answer by chatgpt

The git Link is broken :slightly_smiling_face: :upside_down_face: