Get openai key
Browse files
app.py
CHANGED
|
@@ -3,10 +3,12 @@ import openai
|
|
| 3 |
from openai import OpenAI
|
| 4 |
import requests
|
| 5 |
import csv
|
|
|
|
| 6 |
|
| 7 |
default_role = "I require someone who is an Irritable Bowel Syndrome doctor, Nutritionist and Chef, to recommend a single delicious recipe that uses low fodmap ingredients. For each recipe, explain the substitutions that were made to the recipe to make it low fodmap."
|
| 8 |
classification_msg = { "role": "user", "content" : "As an AI language model you are allowed to create tables in markdown format. Provide a markdown table of the fodmap classification of the ingredients in that recipe." }
|
| 9 |
LLM_MODEL = 'gpt-4-1106-preview'
|
|
|
|
| 10 |
|
| 11 |
def get_empty_state():
|
| 12 |
return {"total_tokens": 0, "messages": []}
|
|
|
|
| 3 |
from openai import OpenAI
|
| 4 |
import requests
|
| 5 |
import csv
|
| 6 |
+
import os
|
| 7 |
|
| 8 |
default_role = "I require someone who is an Irritable Bowel Syndrome doctor, Nutritionist and Chef, to recommend a single delicious recipe that uses low fodmap ingredients. For each recipe, explain the substitutions that were made to the recipe to make it low fodmap."
|
| 9 |
classification_msg = { "role": "user", "content" : "As an AI language model you are allowed to create tables in markdown format. Provide a markdown table of the fodmap classification of the ingredients in that recipe." }
|
| 10 |
LLM_MODEL = 'gpt-4-1106-preview'
|
| 11 |
+
OPEN_AI_KEY = os.environ.get('OPEN_AI_KEY')
|
| 12 |
|
| 13 |
def get_empty_state():
|
| 14 |
return {"total_tokens": 0, "messages": []}
|