johnhelf commited on
Commit
b9fdef6
·
1 Parent(s): ca93569

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -16,13 +16,13 @@ def create_temp_folder() -> str:
16
  return temp_folder
17
 
18
 
19
- async def get_images(prompt: str, files: Optional[list] = None):
20
  if files is None:
21
  files = []
22
  with st.chat_message("user"):
23
  st.write(prompt)
24
  with st.spinner():
25
- async with CodeInterpreterSession(model="gpt-3.5-turbo") as session:
26
  response = await session.generate_response(prompt, files=files)
27
 
28
  with st.chat_message("assistant"):
 
16
  return temp_folder
17
 
18
 
19
+ async def get_images(prompt: str, files: Optional[list] = None,openai_key=None):
20
  if files is None:
21
  files = []
22
  with st.chat_message("user"):
23
  st.write(prompt)
24
  with st.spinner():
25
+ async with CodeInterpreterSession(model="gpt-3.5-turbo",openai_api_key=openai_key) as session:
26
  response = await session.generate_response(prompt, files=files)
27
 
28
  with st.chat_message("assistant"):