Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -3,9 +3,10 @@ from openai import OpenAI
|
|
3 |
import json
|
4 |
import os
|
5 |
app = FastAPI()
|
6 |
-
client = OpenAI(api_key=OPENAI_API_KEY)
|
7 |
org = os.getenv("org")
|
8 |
OPENAI_API_KEY = os.getenv("open_ai")
|
|
|
9 |
@app.post("/get_questions")
|
10 |
async def getQuestions(job_description: str, no_of_questions: int):
|
11 |
response = client.chat.completions.create(
|
|
|
3 |
import json
|
4 |
import os
|
5 |
app = FastAPI()
|
6 |
+
#client = OpenAI(api_key=OPENAI_API_KEY)
|
7 |
org = os.getenv("org")
|
8 |
OPENAI_API_KEY = os.getenv("open_ai")
|
9 |
+
client = OpenAI(api_key=OPENAI_API_KEY, organization=org)
|
10 |
@app.post("/get_questions")
|
11 |
async def getQuestions(job_description: str, no_of_questions: int):
|
12 |
response = client.chat.completions.create(
|