Skip to content

Commit

Permalink
key
Browse files Browse the repository at this point in the history
  • Loading branch information
Dainius Kirsnauskas committed May 28, 2024
1 parent e0024ed commit 14b06be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Empty file added GUI/back-end/key
Empty file.
8 changes: 7 additions & 1 deletion GUI/back-end/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import logging

from flask import Flask, request
from flask_cors import CORS
from dotenv import load_dotenv
Expand Down Expand Up @@ -33,10 +35,14 @@
@app.route('/api/v1/request', methods=['POST'])
def process():
request_data = request.get_json()
print("Got data")
logging.info(request_data)
if not request_data:
return ''

openai.api_key = "sk-proj-eWH61LkiWI5jdiRVrxRhT3BlbkFJAjtKQGoYXwzt2JXaWZMz"
with open("key") as f:
openai.api_key = f.readline()

discussions = [{"role": "system", "content": "I guessed number 5"}]
discussions.append({"role": "user", "content": request_data})

Expand Down

0 comments on commit 14b06be

Please sign in to comment.