File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 4
4
import asyncio
5
5
import websockets
6
6
from fastapi import FastAPI , WebSocket , Request
7
- from fastapi .responses import HTMLResponse
7
+ from fastapi .responses import HTMLResponse , JSONResponse
8
8
from fastapi .websockets import WebSocketDisconnect
9
9
from twilio .twiml .voice_response import VoiceResponse , Connect , Say , Stream
10
10
from dotenv import load_dotenv
34
34
if not OPENAI_API_KEY :
35
35
raise ValueError ('Missing the OpenAI API key. Please set it in the .env file.' )
36
36
37
- @app .get ("/" , response_class = HTMLResponse )
37
+ @app .get ("/" , response_class = JSONResponse )
38
38
async def index_page ():
39
39
return {"message" : "Twilio Media Stream Server is running!" }
40
40
@@ -224,4 +224,4 @@ async def initialize_session(openai_ws):
224
224
225
225
if __name__ == "__main__" :
226
226
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