OpenAI API Key Leaked

hi @SomebodySysop !!

There are two places that you can pass your API Keys to Weaviate.

  1. At the client instantiation, as header:
# Recommended: save sensitive data as environment variables
openai_key = os.getenv("OPENAI_APIKEY")
headers = {
    "X-OpenAI-Api-Key": openai_key,
}

or at the server level, providing the environment variable OPENAI_APIKEY

Let me know if that helps!

Thanks!

1 Like