Skip to content

[Bug]: LiteLLM keys not working on demo completion call #482

@ishaan-jaff

Description

@ishaan-jaff

What happened?

Tried copy pasting code on docs and it failed with this exception:

https://docs.litellm.ai/docs/

Code to repro

from litellm import completion
import os

## set ENV variables
os.environ["OPENAI_API_KEY"] = "sk-litellm-7_NPZhMGxY2GoHC59LgbDw" # [OPTIONAL] replace with your openai key

response = completion(
  model="gpt-3.5-turbo", 
  messages=[{ "content": "Hello, how are you?","role": "user"}]
)

Exception

Screenshot 2023-09-28 at 8 03 09 AM

Relevant log output

No response

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions