Improved logging
This commit is contained in:
parent
ca74e03ba7
commit
aa4aeb8e21
3
app.py
3
app.py
@ -124,6 +124,8 @@ def get_chatgpt_html_response(message: str) -> str:
|
||||
None
|
||||
"""
|
||||
|
||||
logging.info(f"The topic to generate is {message}")
|
||||
|
||||
try:
|
||||
completion = openai.ChatCompletion.create(
|
||||
model="gpt-3.5-turbo",
|
||||
@ -158,7 +160,6 @@ def index():
|
||||
@app.route("/start")
|
||||
def start():
|
||||
random_topic = get_random_topic()
|
||||
logging.info(f"The random topic is {random_topic}")
|
||||
return get_chatgpt_html_response(random_topic)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user