Skip to content

Commit

Permalink
LLM Suggestion local runs
Browse files Browse the repository at this point in the history
- Adds LLM feature to next
- Creates endpoints in flask
- Adds conditional logic checking for OPEN_API_KEY
- Update READEME.md
- Update env-config with next vars
  • Loading branch information
lukemun committed Dec 4, 2024
1 parent f08e7d4 commit 7162f9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flask/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def __init__(self, import_name, *args, **kwargs):
app = MyFlask(__name__)
CORS(app)

client = OpenAI(api_key= os.getenv["OPENAI_API_KEY"])
client = OpenAI(api_key= os.getenv("OPENAI_API_KEY"))


@app.route('/suggestion', methods=['GET'])
Expand Down Expand Up @@ -293,7 +293,7 @@ def connect():

@app.route('/showSuggestion', methods=['GET'])
def showSuggestion():
return jsonify({"response":os.getenv["OPENAI_API_KEY"] is not None}), 200
return jsonify({"response":os.getenv("OPENAI_API_KEY") is not None}), 200

@app.route('/product/0/info', methods=['GET'])
def product_info():
Expand Down

0 comments on commit 7162f9d

Please sign in to comment.