From a3a95293d57534981ad31b963a622a1667911a7c Mon Sep 17 00:00:00 2001 From: if Date: Thu, 23 Mar 2023 11:08:40 +0300 Subject: [PATCH] fix import & add watchdog --- requirements.txt | 1 + src/utils/ai_interaction.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 00c421f..45aa4bf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ streamlit_option_menu==0.3.2 openai==0.27.2 gtts==2.3.1 pip==23.0.1 +watchdog==3.0.0 diff --git a/src/utils/ai_interaction.py b/src/utils/ai_interaction.py index 331e436..0ba9b87 100644 --- a/src/utils/ai_interaction.py +++ b/src/utils/ai_interaction.py @@ -1,3 +1,4 @@ +import logging from typing import List import openai @@ -7,7 +8,6 @@ import streamlit as st @st.cache_data() def send_ai_request(ai_model: str, messages: List[dict]) -> dict: openai.api_key = st.secrets.api_credentials.api_key - import logging logging.warning("messages:") logging.warning(messages) completion = openai.ChatCompletion.create(