Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -39,7 +39,8 @@ available_model_ids = []
|
|
| 39 |
class Payload(BaseModel):
|
| 40 |
model: str
|
| 41 |
messages: list
|
| 42 |
-
stream: bool
|
|
|
|
| 43 |
@app.get("/favicon.ico")
|
| 44 |
async def favicon():
|
| 45 |
# The favicon.ico file is in the same directory as the app
|
|
@@ -175,7 +176,7 @@ async def get_completion(payload: Payload, request: Request):
|
|
| 175 |
# Prepare payload
|
| 176 |
payload_dict = payload.dict()
|
| 177 |
payload_dict["model"] = model_to_use
|
| 178 |
-
payload_dict["stream"] = payload_dict.get("stream", False)
|
| 179 |
# Select the appropriate endpoint
|
| 180 |
endpoint = secret_api_endpoint_2 if model_to_use in alternate_models else secret_api_endpoint
|
| 181 |
|
|
|
|
| 39 |
class Payload(BaseModel):
|
| 40 |
model: str
|
| 41 |
messages: list
|
| 42 |
+
stream: bool = False
|
| 43 |
+
|
| 44 |
@app.get("/favicon.ico")
|
| 45 |
async def favicon():
|
| 46 |
# The favicon.ico file is in the same directory as the app
|
|
|
|
| 176 |
# Prepare payload
|
| 177 |
payload_dict = payload.dict()
|
| 178 |
payload_dict["model"] = model_to_use
|
| 179 |
+
# payload_dict["stream"] = payload_dict.get("stream", False)
|
| 180 |
# Select the appropriate endpoint
|
| 181 |
endpoint = secret_api_endpoint_2 if model_to_use in alternate_models else secret_api_endpoint
|
| 182 |
|