Spaces:
Running
Running
Upload 2 files
Browse files
main.py
CHANGED
@@ -936,16 +936,14 @@ def v1beta3_google_ai(
|
|
936 |
except:
|
937 |
return SuccessResponse(status="False", randydev={"message": internal_error})
|
938 |
|
939 |
-
@app.post("/ryuzaki/
|
940 |
-
def
|
941 |
try:
|
942 |
-
x =
|
943 |
-
|
944 |
-
|
945 |
-
mongo_url=MONGO_URL
|
946 |
)
|
947 |
-
|
948 |
-
response = x.rag_chat(item.query)
|
949 |
return SuccessResponse(
|
950 |
status="True",
|
951 |
randydev={"message": response}
|
@@ -1555,7 +1553,7 @@ def custom_openapi():
|
|
1555 |
return app.openapi_schema
|
1556 |
openapi_schema = get_openapi(
|
1557 |
title="RyuzakiLib API",
|
1558 |
-
version="3.3.
|
1559 |
summary="Use It Only For Personal Project Else I Need To Delete The Api",
|
1560 |
description=description,
|
1561 |
routes=app.routes,
|
|
|
936 |
except:
|
937 |
return SuccessResponse(status="False", randydev={"message": internal_error})
|
938 |
|
939 |
+
@app.post("/ryuzaki/faceai", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
940 |
+
async def faceai(item: BetaRags):
|
941 |
try:
|
942 |
+
x = FaceAI(
|
943 |
+
clients_name=item.clients_name,
|
944 |
+
token=HUGGING_TOKEN
|
|
|
945 |
)
|
946 |
+
response = await x.chat(item.query, no_db=True)
|
|
|
947 |
return SuccessResponse(
|
948 |
status="True",
|
949 |
randydev={"message": response}
|
|
|
1553 |
return app.openapi_schema
|
1554 |
openapi_schema = get_openapi(
|
1555 |
title="RyuzakiLib API",
|
1556 |
+
version="3.3.1",
|
1557 |
summary="Use It Only For Personal Project Else I Need To Delete The Api",
|
1558 |
description=description,
|
1559 |
routes=app.routes,
|
models.py
CHANGED
@@ -71,7 +71,7 @@ class ChatgptCustom(BaseModel):
|
|
71 |
|
72 |
class BetaRags(BaseModel):
|
73 |
query: str
|
74 |
-
|
75 |
|
76 |
class GeminiPro(BaseModel):
|
77 |
query: str
|
|
|
71 |
|
72 |
class BetaRags(BaseModel):
|
73 |
query: str
|
74 |
+
clients_name: str
|
75 |
|
76 |
class GeminiPro(BaseModel):
|
77 |
query: str
|