File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 44import asyncio
55import websockets
66from fastapi import FastAPI , WebSocket , Request
7- from fastapi .responses import HTMLResponse
7+ from fastapi .responses import HTMLResponse , JSONResponse
88from fastapi .websockets import WebSocketDisconnect
99from twilio .twiml .voice_response import VoiceResponse , Connect , Say , Stream
1010from dotenv import load_dotenv
3434if not OPENAI_API_KEY :
3535 raise ValueError ('Missing the OpenAI API key. Please set it in the .env file.' )
3636
37- @app .get ("/" , response_class = HTMLResponse )
37+ @app .get ("/" , response_class = JSONResponse )
3838async def index_page ():
3939 return {"message" : "Twilio Media Stream Server is running!" }
4040
@@ -224,4 +224,4 @@ async def initialize_session(openai_ws):
224224
225225if __name__ == "__main__" :
226226 import uvicorn
227- uvicorn .run (app , host = "0.0.0.0" , port = PORT )
227+ uvicorn .run (app , host = "0.0.0.0" , port = PORT )
You can’t perform that action at this time.
0 commit comments