Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhanyu committed Mar 5, 2023
1 parent ca9bd56 commit c313bc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

os.environ['GPT_ENGINE'] = 'gpt-3.5-turbo'
api_key = os.environ.get('API_KEY')
chatbot = Chatbot(api_key=api_key)


app = Flask(__name__)
Expand All @@ -19,6 +20,8 @@ def index():

@app.route('/wechat',methods=['GET','POST'])
def wechat():
print(chatbot)

if request.method == 'POST':
print('测试api是否可用')
chatbot.ask('你好')
Expand Down Expand Up @@ -93,5 +96,4 @@ def wechat():


if __name__ == '__main__':
chatbot = Chatbot(api_key=api_key)
app.run(host='0.0.0.0', port=80, debug=True)

0 comments on commit c313bc9

Please sign in to comment.