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