cycls 0.0.2.38__py3-none-any.whl → 0.0.2.40__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cycls/__init__.py +1 -1
- cycls/sdk.py +14 -5
- cycls/theme/assets/index-CtrsaaFE.js +378 -0
- cycls/theme/index.html +1 -1
- cycls/web.py +22 -9
- {cycls-0.0.2.38.dist-info → cycls-0.0.2.40.dist-info}/METADATA +1 -1
- cycls-0.0.2.40.dist-info/RECORD +9 -0
- cycls/theme/assets/index-D0-uI8sw.js +0 -364
- cycls-0.0.2.38.dist-info/RECORD +0 -9
- {cycls-0.0.2.38.dist-info → cycls-0.0.2.40.dist-info}/WHEEL +0 -0
cycls/theme/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
const PROD = {{ prod | tojson }};
|
|
16
16
|
const PUBLISHABLE_KEY = "{{ pk_live if prod else pk_test }}";
|
|
17
17
|
</script>
|
|
18
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
+
<script type="module" crossorigin src="/assets/index-CtrsaaFE.js"></script>
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
|
21
21
|
<div id="root"></div>
|
cycls/web.py
CHANGED
|
@@ -43,7 +43,6 @@ def web(func, front_end_path="", prod=False, org=None, api_token=None, header=""
|
|
|
43
43
|
import jwt
|
|
44
44
|
from pydantic import BaseModel, EmailStr
|
|
45
45
|
from typing import List, Optional
|
|
46
|
-
from fastapi.templating import Jinja2Templates
|
|
47
46
|
from fastapi.staticfiles import StaticFiles
|
|
48
47
|
|
|
49
48
|
class User(BaseModel):
|
|
@@ -53,6 +52,15 @@ def web(func, front_end_path="", prod=False, org=None, api_token=None, header=""
|
|
|
53
52
|
org: Optional[str] = None
|
|
54
53
|
plans: List[str] = []
|
|
55
54
|
|
|
55
|
+
class Metadata(BaseModel):
|
|
56
|
+
header: str
|
|
57
|
+
intro: str
|
|
58
|
+
prod: bool
|
|
59
|
+
auth: bool
|
|
60
|
+
org: Optional[str]
|
|
61
|
+
pk_live: str
|
|
62
|
+
pk_test: str
|
|
63
|
+
|
|
56
64
|
class Context(BaseModel):
|
|
57
65
|
messages: List[dict]
|
|
58
66
|
user: Optional[User] = None
|
|
@@ -84,12 +92,17 @@ def web(func, front_end_path="", prod=False, org=None, api_token=None, header=""
|
|
|
84
92
|
stream = openai_encoder(stream)
|
|
85
93
|
return StreamingResponse(stream, media_type="text/event-stream")
|
|
86
94
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
@app.get("/metadata")
|
|
96
|
+
async def metadata():
|
|
97
|
+
return Metadata(
|
|
98
|
+
header=header,
|
|
99
|
+
intro=intro,
|
|
100
|
+
prod=prod,
|
|
101
|
+
auth=auth,
|
|
102
|
+
org=org,
|
|
103
|
+
pk_live="pk_live_Y2xlcmsuY3ljbHMuY29tJA",
|
|
104
|
+
pk_test="pk_test_c2VsZWN0LXNsb3RoLTU4LmNsZXJrLmFjY291bnRzLmRldiQ"
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
app.mount("/", StaticFiles(directory=front_end_path, html=True))
|
|
95
108
|
return app
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
cycls/__init__.py,sha256=bVT0dYTXLdSC3ZURgtm-DEOj-VO6RUM6zGsJB0zuj6Y,61
|
|
2
|
+
cycls/runtime.py,sha256=GoRfyPn2uKTIMb4FSowjfo02DsL0VrunDuybdeZxsvM,18221
|
|
3
|
+
cycls/sdk.py,sha256=nulpOevAN5tzQcyMSJFNSMY_eSyLZd364vpaNxxfFJY,5092
|
|
4
|
+
cycls/theme/assets/index-CtrsaaFE.js,sha256=btDvr0124sxirYbKpdKWbRRS3RfmXpSLhA8qt0bY9tM,1085004
|
|
5
|
+
cycls/theme/index.html,sha256=cWg4aHCNu7WviItMLVE2O5sHpTkQXQjI7RzExKNsPsU,895
|
|
6
|
+
cycls/web.py,sha256=kNCPLrB0T6_AMmvZ9fPAhnVSa3avjbTAhnwsS6zMrXs,4268
|
|
7
|
+
cycls-0.0.2.40.dist-info/METADATA,sha256=qTHxk3xAAorF7llOHTxIsdUVwWr3lAhWOYh_oU9SkRE,5666
|
|
8
|
+
cycls-0.0.2.40.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
9
|
+
cycls-0.0.2.40.dist-info/RECORD,,
|