Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -4,6 +4,10 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
| 4 |
from twilio.twiml.messaging_response import MessagingResponse
|
| 5 |
import os,openai
|
| 6 |
import google.generativeai as genai
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
secret = os.environ["key"]
|
| 9 |
|
|
@@ -28,6 +32,7 @@ app.add_middleware(
|
|
| 28 |
|
| 29 |
@app.post("/update_user_guide_data")
|
| 30 |
async def update_user_guide_data():
|
|
|
|
| 31 |
return "guide updated"
|
| 32 |
|
| 33 |
@app.post("/whatsapp")
|
|
|
|
| 4 |
from twilio.twiml.messaging_response import MessagingResponse
|
| 5 |
import os,openai
|
| 6 |
import google.generativeai as genai
|
| 7 |
+
from llama_index.llms import OpenAI
|
| 8 |
+
from llama_index import VectorStoreIndex, SimpleDirectoryReader
|
| 9 |
+
from llama_index.llms import OpenAI
|
| 10 |
+
from llama_index import StorageContext, load_index_from_storage
|
| 11 |
|
| 12 |
secret = os.environ["key"]
|
| 13 |
|
|
|
|
| 32 |
|
| 33 |
@app.post("/update_user_guide_data")
|
| 34 |
async def update_user_guide_data():
|
| 35 |
+
user_guide_sync.update_user_guide()
|
| 36 |
return "guide updated"
|
| 37 |
|
| 38 |
@app.post("/whatsapp")
|