Corin1998 commited on
Commit
470c8a3
·
verified ·
1 Parent(s): ca2e0b4

Create openai_client.py

Browse files
Files changed (1) hide show
  1. app/openai_client.py +9 -0
app/openai_client.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+ import os, json
3
+ import httpx
4
+
5
+ OPENAI_BASE = os.environ.get("OPENAI_BASE", "https://api.openai.com/v1")
6
+ OPENAI_MODEL = os.environ.get("OPENAI_MODEL", "gpt-4o-mini")
7
+ OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
8
+
9
+ _headers =