Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,6 @@ def main():
|
|
| 58 |
|
| 59 |
# Define model priority
|
| 60 |
models = ["o1-preview", "o1-preview-2024-09-12","o1-mini","gpt-4o-mini","gpt-3.5-turbo"] # Add more models as needed
|
| 61 |
-
|
| 62 |
# Get API key
|
| 63 |
api_key = get_api_key()
|
| 64 |
if not api_key:
|
|
@@ -81,6 +80,7 @@ def main():
|
|
| 81 |
full_response = "" # Reset for the next model attempt
|
| 82 |
|
| 83 |
if full_response:
|
|
|
|
| 84 |
# Add bot message to state
|
| 85 |
st.session_state.messages.append({"role": "assistant", "content": full_response})
|
| 86 |
|
|
|
|
| 58 |
|
| 59 |
# Define model priority
|
| 60 |
models = ["o1-preview", "o1-preview-2024-09-12","o1-mini","gpt-4o-mini","gpt-3.5-turbo"] # Add more models as needed
|
|
|
|
| 61 |
# Get API key
|
| 62 |
api_key = get_api_key()
|
| 63 |
if not api_key:
|
|
|
|
| 80 |
full_response = "" # Reset for the next model attempt
|
| 81 |
|
| 82 |
if full_response:
|
| 83 |
+
print(f"Using {model} for generation")
|
| 84 |
# Add bot message to state
|
| 85 |
st.session_state.messages.append({"role": "assistant", "content": full_response})
|
| 86 |
|