Skip to content

can't use grok api key unless the environmental variable GROQ_API_KEY is set #6

Description

@spam0115

I entered in my groq api keys in the text user interface. At the end, an error was shown saying it couldn't use groq unless the api key was passed in or environmental variable was set. Shouldn't it have worked since I pasted the key into the prompt the interface gave me?

│    80 │   │   if api_key is None:                                                                                    ││    81 │   │   │   api_key = os.environ.get("GROQ_API_KEY")                                                           ││    82 │   │   if api_key is None:                                                                                    │
│ ❱  83 │   │   │   raise GroqError(                                                                                   ││    84 │   │   │   │   "The api_key client option must be set either by passing api_key to the client or by setting   ││       the GROQ_API_KEY environment variable"                                                                         │
│    85 │   │   │   )                                                                                                  ││    86 │   │   self.api_key = api_key                                                                                 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
GroqError: The api_key client option must be set either by passing api_key to the client or by setting the GROQ_API_KEY
environment variable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions