This commit is contained in:
Timothy Jaeryang Baek
2025-02-12 23:26:47 -08:00
parent 2b7f9d14d0
commit 83e5db7be7
4 changed files with 16 additions and 11 deletions

View File

@@ -622,7 +622,7 @@ async def process_chat_payload(request, form_data, metadata, user, model):
# Initialize events to store additional event to be sent to the client
# Initialize contexts and citation
if request.state.direct and request.state.model:
if getattr(request.state, "direct", False) and hasattr(request.state, "model"):
models = {
request.state.model["id"]: request.state.model,
}