Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,6 +22,9 @@ MODEL_OPTIONS = [
|
|
22 |
]
|
23 |
|
24 |
def generate_text(input_text, selected_model, history):
|
|
|
|
|
|
|
25 |
response = requests.post(
|
26 |
url="https://openrouter.ai/api/v1/chat/completions",
|
27 |
headers={
|
|
|
22 |
]
|
23 |
|
24 |
def generate_text(input_text, selected_model, history):
|
25 |
+
if history is None:
|
26 |
+
history = "" # Initialize history if it's None
|
27 |
+
|
28 |
response = requests.post(
|
29 |
url="https://openrouter.ai/api/v1/chat/completions",
|
30 |
headers={
|