I am trying to use fabric by Daniel Miessler from GitHub with my OpenAI API key, but I keep getting a “401 Unauthorized” error. Here is the detailed error message:
Error: Client error ‘401 Unauthorized’ for url ‘API OPENAI COM V1 MODELS Link’
When running the following command:
yt --transcript [some YouTube video link] | fabric --pattern summarize
I encounter the same “401 Unauthorized” error along with a traceback ending in BrokenPipeError: [Errno 32] Broken pipe.
config_patterns_directory = os.path.join(config, "patterns")
config_context = os.path.join(config, "context.md")
env_file = os.path.join(config, ".env")
if not os.path.exists(config):
os.makedirs(config)
if args.setup:
Setup().run()
Alias().execute()
sys.exit()
if not os.path.exists(env_file) or not os.path.exists(config_patterns_directory):
print("Please run --setup to set up your API key and download patterns.")
sys.exit()
Where you’ll be needing to configure how it connects and the model.
The whole thing is just a prompt library. Doing things you can just ask ChatGPT.
Links are not allowed in my post; I manually typed some filler for the URL you have listed.
I’m still having trouble with fabric accessing my OpenAI API Key. It was deleted; however, I created a new secret key from the Project API keys page.
Selected ‘Owned by: You’
Created a Name
Assigned to Project
Permissions: All
Create secret key
Saved my key and copied it to the fabric --setup OpenAI API Key input
The input or output tokens must be reduced now.
Error: Error code: 429 - {‘error’: {‘message’: ‘Request too large for gpt-4-turbo-preview in organization APIKEY on tokens per min (TPM): Limit 30000, Requested 30577. The input or output tokens must be reduced in order to run successfully. Visit https://platform.openai.com/account/rate-limits to learn more.’, ‘type’: ‘tokens’, ‘param’: None, ‘code’: ‘rate_limit_exceeded’}}
If the API key was automatically deleted, it’s because you are leaking it with your code or application and it was detected in a public place by OpenAI.