fix logging
This commit is contained in:
parent
18b88b9029
commit
4ad96c3fc1
@ -8,13 +8,11 @@ import streamlit as st
|
||||
@st.cache_data()
|
||||
def chat_gpt_request(ai_model: str, messages: List[dict]) -> dict:
|
||||
openai.api_key = st.secrets.api_credentials.api_key
|
||||
logging.warning("messages:")
|
||||
logging.warning(messages)
|
||||
logging.info(f"{messages=}")
|
||||
completion = openai.ChatCompletion.create(
|
||||
model=ai_model,
|
||||
messages=messages,
|
||||
# temperature=0.7,
|
||||
)
|
||||
logging.warning("completion:")
|
||||
logging.warning(completion)
|
||||
logging.info(f"{completion=}")
|
||||
return completion
|
||||
|
Loading…
Reference in New Issue
Block a user