File size: 568 Bytes
7bf4b88 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import os
import os.path as osp
import warnings
import openai
try:
assert os.environ.get("ANTHROPIC_API_KEY") is not None
print("Anthropic API key found.")
except Exception as e:
pass
try:
assert os.environ.get("VOYAGE_API_KEY") is not None
print("Voyage API key found.")
except Exception as e:
pass
try:
assert os.environ.get("OPENAI_API_KEY") is not None
print("OpenAI API key found.")
openai.api_key = os.environ.get("OPENAI_API_KEY")
openai.organization = os.environ.get("OPENAI_ORG")
except Exception as e:
pass
|