fix import & add watchdog
This commit is contained in:
parent
3818bc67d1
commit
a3a95293d5
@ -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
|
||||||
|
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user