BICORP commited on
Commit
24d64e6
·
verified ·
1 Parent(s): 1bd8213

Update .env.local

Browse files
Files changed (1) hide show
  1. .env.local +148 -3
.env.local CHANGED
@@ -26,11 +26,156 @@ MODELS=`[
26
  "top_k": 50,
27
  "truncate": 1000,
28
  "max_new_tokens": 1024,
29
- "stop": ["</s>", "<|>"]
30
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  }
32
  ]`
33
 
34
- PUBLIC_APP_NAME="Lake AI"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
- MONGODB_URL=mongodb://localhost:27017
 
 
 
 
 
 
 
 
26
  "top_k": 50,
27
  "truncate": 1000,
28
  "max_new_tokens": 1024,
29
+ "stop": ["</s"]
30
  }
31
+ },
32
+ {
33
+ "name": "Lake 1 Plus",
34
+ "promptExamples": [
35
+ {
36
+ "title": "Java Sorting",
37
+ "prompt": "How can I write a Java function to sort an array of integers?"
38
+ }, {
39
+ "title": "What is a neural network?",
40
+ "prompt": "What is a neural network, and how does it work?"
41
+ }, {
42
+ "title": "Data Structures",
43
+ "prompt": "Explain the difference between a stack and a queue"
44
+ }
45
+ ],
46
+ "endpoints": [
47
+ {
48
+ "type": "tgi",
49
+ "url": "http://127.0.0.1:8081"
50
+ }
51
+ ],
52
+ "parameters": {
53
+ "temperature": 0.8,
54
+ "top_p": 0.9,
55
+ "repetition_penalty": 1.1,
56
+ "top_k": 40,
57
+ "truncate": 900,
58
+ "max_new_tokens": 1024,
59
+ "stop": ["</s"]
60
+ },
61
+ "access": "plus"
62
+ },
63
+ {
64
+ "name": "Lake 2 Flash",
65
+ "promptExamples": [
66
+ {
67
+ "title": "Python Web Development",
68
+ "prompt": "How can I create a simple web server using Python?"
69
+ }, {
70
+ "title": "What is a database?",
71
+ "prompt": "What is a database, and how does it work?"
72
+ }, {
73
+ "title": "Machine Learning",
74
+ "prompt": "Explain the difference between supervised and unsupervised learning"
75
+ }
76
+ ],
77
+ "endpoints": [
78
+ {
79
+ "type": "tgi",
80
+ "url": "http://127.0.0.1:8082"
81
+ }
82
+ ],
83
+ "parameters": {
84
+ "temperature": 0.9,
85
+ "top_p": 0.85,
86
+ "repetition_penalty": 1.0,
87
+ "top_k": 30,
88
+ "truncate": 800,
89
+ "max_new_tokens": 1024,
90
+ "stop": ["</s"]
91
+ },
92
+ "access": "free"
93
+ },
94
+ {
95
+ "name": "Lake 1 Pro",
96
+ "promptExamples": [
97
+ {
98
+ "title": "Advanced Python",
99
+ "prompt": "How can I use Python to create a complex data structure?"
100
+ }, {
101
+ "title": "What is a blockchain?",
102
+ "prompt": "What is a blockchain, and how does it work?"
103
+ }, {
104
+ "title": "Artificial Intelligence",
105
+ "prompt": "Explain the difference between AI and ML"
106
+ }
107
+ ],
108
+ "endpoints": [
109
+ {
110
+ "type": "tgi",
111
+ "url": "http://127.0.0.1:8083"
112
+ }
113
+ ],
114
+ "parameters": {
115
+ "temperature": 0.95,
116
+ "top_p": 0.8,
117
+ "repetition_penalty": 0.9,
118
+ "top_k": 20,
119
+ "truncate": 700,
120
+ "max_new_tokens": 1024,
121
+ "stop": ["</s"]
122
+ },
123
+ "access": "pro"
124
  }
125
  ]`
126
 
127
+ To access the premium and pro models, users will need to pay real money. The payment system can be integrated using a payment gateway API, such as Stripe or PayPal. The access levels can be defined as follows:
128
+
129
+ * Free: Access to Lake 1 and Lake 2 Flash models
130
+ * Plus: Access to Lake 1, Lake 2 Flash, Lake 1 Plus models
131
+ * Pro: Access to all models, including Lake 1, Lake 2 Flash, Lake 1 Plus, Lake 1 Pro
132
+
133
+ The payment system can be implemented using a subscription-based model, where users can choose to pay monthly or annually for access to the premium and pro models.
134
+
135
+ Here is an example of how the payment system can be implemented using Stripe:
136
+ ```python
137
+ import patreon
138
+
139
+ patreon.api_client = patreon.APIv2Client(
140
+ client_id="vz9JKiN9T6yO1s9F7CNDYMD4UlrF8fIVqkDSArkZTxafvvIRdQ0Qg24XNSXos6J2",
141
+ client_secret="s5EhScWc7aa4HmjMtG7ukFYnCfJivFDIzfien-yFei4_UNr_XPdzgqzKl7d0GLe4",
142
+ access_token="wryrin3mSMgxFHzApCA2-qMjHyCgsvrxP8mYY_XYNro"
143
+ )
144
+
145
+ def create_subscription(tier_id, patron_id):
146
+ subscription = patreon.Subscription(
147
+ tier_id=tier_id,
148
+ patron_id=patron_id
149
+ )
150
+ try:
151
+ subscription.create()
152
+ return subscription
153
+ except patreon.APIError as e:
154
+ print(f"Error creating subscription: {e}")
155
+ return None
156
+
157
+ def get_subscription(subscription_id):
158
+ try:
159
+ subscription = patreon.Subscription.find(subscription_id)
160
+ return subscription
161
+ except patreon.APIError as e:
162
+ print(f"Error getting subscription: {e}")
163
+ return None
164
+
165
+ def update_subscription(subscription_id, tier_id):
166
+ try:
167
+ subscription = patreon.Subscription.find(subscription_id)
168
+ subscription.update(tier_id=tier_id)
169
+ return subscription
170
+ except patreon.APIError as e:
171
+ print(f"Error updating subscription: {e}")
172
+ return None
173
 
174
+ def cancel_subscription(subscription_id):
175
+ try:
176
+ subscription = patreon.Subscription.find(subscription_id)
177
+ subscription.delete()
178
+ return subscription
179
+ except patreon.APIError as e:
180
+ print(f"Error canceling subscription: {e}")
181
+ return None