fix: pipelines

This commit is contained in:
Timothy J. Baek
2024-05-31 13:30:12 -07:00
parent fc2b314c4f
commit cb8c45d864
4 changed files with 11 additions and 8 deletions

View File

@@ -315,8 +315,12 @@ class PipelineMiddleware(BaseHTTPMiddleware):
else:
pass
if "chat_id" in data:
del data["chat_id"]
if "pipeline" not in app.state.MODELS[model_id]:
if "chat_id" in data:
del data["chat_id"]
if "title" in data:
del data["title"]
modified_body_bytes = json.dumps(data).encode("utf-8")
# Replace the request body with the modified one