fix import & add watchdog

This commit is contained in:
if 2023-03-23 11:08:40 +03:00
parent 3818bc67d1
commit a3a95293d5
2 changed files with 2 additions and 1 deletions

View File

@ -4,3 +4,4 @@ streamlit_option_menu==0.3.2
openai==0.27.2 openai==0.27.2
gtts==2.3.1 gtts==2.3.1
pip==23.0.1 pip==23.0.1
watchdog==3.0.0

View File

@ -1,3 +1,4 @@
import logging
from typing import List from typing import List
import openai import openai
@ -7,7 +8,6 @@ import streamlit as st
@st.cache_data() @st.cache_data()
def send_ai_request(ai_model: str, messages: List[dict]) -> dict: def send_ai_request(ai_model: str, messages: List[dict]) -> dict:
openai.api_key = st.secrets.api_credentials.api_key openai.api_key = st.secrets.api_credentials.api_key
import logging
logging.warning("messages:") logging.warning("messages:")
logging.warning(messages) logging.warning(messages)
completion = openai.ChatCompletion.create( completion = openai.ChatCompletion.create(