mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-19 11:41:04 +02:00
feat: enable Sarvam Models
This commit is contained in:
parent
92bdfd6cac
commit
514d9c5238
4 changed files with 25 additions and 18 deletions
|
|
@ -166,7 +166,7 @@ async def initiate_call(
|
|||
workflow_run_id=workflow_run.id,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
logger.warning(
|
||||
f"Failed to initiate call for workflow run {workflow_run.id}: {e}"
|
||||
)
|
||||
raise HTTPException(
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ from pydantic import BaseModel
|
|||
from sqlalchemy import text
|
||||
from sqlalchemy.future import select
|
||||
from starlette.responses import HTMLResponse
|
||||
from starlette.websockets import WebSocketDisconnect
|
||||
|
||||
from api.db import db_client
|
||||
from api.db.models import OrganizationConfigurationModel, UserModel
|
||||
|
|
@ -563,9 +564,15 @@ async def websocket_endpoint(
|
|||
websocket, workflow_id, user_id, workflow_run_id
|
||||
)
|
||||
|
||||
except WebSocketDisconnect as e:
|
||||
logger.info(f"WebSocket disconnected: code={e.code}, reason={e.reason}")
|
||||
except Exception as e:
|
||||
logger.error(f"Error in WebSocket connection: {e}")
|
||||
await websocket.close(1011, "Internal server error")
|
||||
try:
|
||||
await websocket.close(1011, "Internal server error")
|
||||
except RuntimeError:
|
||||
# WebSocket already closed, ignore
|
||||
pass
|
||||
|
||||
|
||||
@router.post("/twilio/status-callback/{workflow_run_id}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue