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

openrouter key doesn't get used again after initial setup! #157

Closed
nikvdp opened this issue Oct 6, 2024 · 1 comment
Closed

openrouter key doesn't get used again after initial setup! #157

nikvdp opened this issue Oct 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nikvdp
Copy link

nikvdp commented Oct 6, 2024

Cool project! I've been enjoying playing with it, but I keep running into an issue: I primarily use OpenRouter, so during the initial setup I pasted in an OpenRouter API key at this screen:

No API key set for OpenAI, Anthropic, or OpenRouter.
You can get one at:
 - OpenAI: https://platform.openai.com/account/api-keys
 - Anthropic: https://console.anthropic.com/settings/keys
 - OpenRouter: https://openrouter.ai/settings/keys
 
Your OpenAI or Anthropic API key: 

The wording in the last prompt was a little confusing since I was pasting in an OpenRouter key not an OpenAI or Anthropic key, but I was pleasantly surprised to see that once I pasted it in everything worked and it even auto-selected an appropriate model to use with OpenRouter.

However after that every time I quit and restart gptme I get the screen from above again and have to paste the openrouter key to before it will let me do anything, even though the key is already added to config.toml under [env].

Here's what my config.toml looks like:

[prompt]
about_user = "I am a curious human programmer."
response_preference = "Basic concepts don't need to be explained."

[prompt.project]
activitywatch = "ActivityWatch is a free and open-source automated time-tracker that helps you track how you spend your time on your devices."
gptme = "gptme is a CLI to interact with large language models in a Chat-style interface, enabling the assistant to execute commands and code on the local machine, letting them assist in all kinds of development and terminal-based work."

[env]
OPENROUTER_API_KEY = "sk-or-v1-de...<redacted>..."

How can I make it use the openrouter key that's stored in config.toml so I don't have to put it in again each time?

@ErikBjare
Copy link
Owner

Oops, fixed in a8dc5fd

Thanks for reporting!

@ErikBjare ErikBjare added the bug Something isn't working label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants