Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
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"):
|