aistv 1.3.7__py3-none-any.whl → 1.3.8__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.
aistv/core.py
CHANGED
@@ -18,17 +18,18 @@ install_package("requests")
|
|
18
18
|
# Cấu hình
|
19
19
|
DB_FILE = "usage.db"
|
20
20
|
SPAM_DELAY_SECONDS = 5
|
21
|
-
FREE_MAX_REQUESTS =
|
22
|
-
NORMAL_MAX_REQUESTS =
|
21
|
+
FREE_MAX_REQUESTS = 20
|
22
|
+
NORMAL_MAX_REQUESTS = 50
|
23
23
|
VIP_MAX_REQUESTS = None # Không giới hạn
|
24
24
|
|
25
25
|
API_KEYS = [
|
26
26
|
"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",
|
27
|
+
"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",
|
27
28
|
]
|
28
29
|
|
29
30
|
# Danh sách token
|
30
31
|
TOKEN_VIP_SET = {"aistv", "phuc"}
|
31
|
-
TOKEN_NORMAL_SET = {"
|
32
|
+
TOKEN_NORMAL_SET = {"token_sk-or-v1-56d24544a83100b354a57f82ea83fc31e6ae249749df44a912e35769123ea5d5", "another_token..."}
|
32
33
|
|
33
34
|
class STVBot:
|
34
35
|
def __init__(self, token: str = None, system_prompt: str = None):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: aistv
|
3
|
-
Version: 1.3.
|
3
|
+
Version: 1.3.8
|
4
4
|
Summary: STV AI Chatbot Library for Python
|
5
5
|
Home-page: https://github.com/phuctrong1tuv
|
6
6
|
Author: Trọng Phúc
|
@@ -85,12 +85,21 @@ while True:
|
|
85
85
|
print("AI STV:", reply)
|
86
86
|
|
87
87
|
```
|
88
|
-
|
88
|
+
🧪 Ví dụ
|
89
|
+
```python
|
90
|
+
from aistv import aistv
|
89
91
|
|
90
|
-
|
92
|
+
Token=TOKEN_API
|
93
|
+
bot = aistv(token)
|
91
94
|
|
92
|
-
|
93
|
-
|
95
|
+
while True:
|
96
|
+
user_input = input("Bạn: ")
|
97
|
+
if user_input.lower() == "exit":
|
98
|
+
break
|
99
|
+
reply = bot.chat(user_input)
|
100
|
+
print("AI STV:", reply)
|
101
|
+
|
102
|
+
```
|
94
103
|
|
95
104
|
|
96
105
|
---
|
@@ -185,7 +194,21 @@ pip install aistv
|
|
185
194
|
reply = bot.chat(user_input)
|
186
195
|
print("AI STV:", reply)
|
187
196
|
```
|
197
|
+
🧪 Example
|
198
|
+
```python
|
199
|
+
from aistv import aistv
|
188
200
|
|
201
|
+
Token=TOKEN_API
|
202
|
+
bot = aistv(token)
|
203
|
+
|
204
|
+
while True:
|
205
|
+
user_input = input("Bạn: ")
|
206
|
+
if user_input.lower() == "exit":
|
207
|
+
break
|
208
|
+
reply = bot.chat(user_input)
|
209
|
+
print("AI STV:", reply)
|
210
|
+
|
211
|
+
```
|
189
212
|
---
|
190
213
|
|
191
214
|
⚙️ Advanced Prompt Customization
|
@@ -0,0 +1,8 @@
|
|
1
|
+
aistv/__init__.py,sha256=G1ZBskWNkKKEK9s51RrBuK-S2_d3Fw8UaLk0RKsbuKw,33
|
2
|
+
aistv/aistv.py,sha256=8OClk7fg1g41NtW7ELj83-g0JF5fV1fQy0dJh2qlV8s,190
|
3
|
+
aistv/core.py,sha256=7524gq2alREOSFmqyfLMwTLm3wQxYKLX17BJ1hIVC_g,5643
|
4
|
+
aistv/trainer.py,sha256=oqIHGAJAJgIdw3P6_BrnXt3JMXYwsGHfGVaJ_e635YU,1125
|
5
|
+
aistv-1.3.8.dist-info/METADATA,sha256=o2bFS_5pYIT5o4_DytYQsAPdTj1gpAB21mq5ZOy_iU0,4568
|
6
|
+
aistv-1.3.8.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
7
|
+
aistv-1.3.8.dist-info/top_level.txt,sha256=P6gyYzXFvBPESQyFZQSi6Rs8v5ALhw-d4UN2Jo9Pkgw,6
|
8
|
+
aistv-1.3.8.dist-info/RECORD,,
|
aistv-1.3.7.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
aistv/__init__.py,sha256=G1ZBskWNkKKEK9s51RrBuK-S2_d3Fw8UaLk0RKsbuKw,33
|
2
|
-
aistv/aistv.py,sha256=8OClk7fg1g41NtW7ELj83-g0JF5fV1fQy0dJh2qlV8s,190
|
3
|
-
aistv/core.py,sha256=ugQ1mpr7LtrfCRPitdNx9ljFlIfZwdNoQHCBuzBOzrQ,5509
|
4
|
-
aistv/trainer.py,sha256=oqIHGAJAJgIdw3P6_BrnXt3JMXYwsGHfGVaJ_e635YU,1125
|
5
|
-
aistv-1.3.7.dist-info/METADATA,sha256=fKGPN4uoSSYxDdBpjKWTV_WxxqyTd7csv4nxezh367Y,4244
|
6
|
-
aistv-1.3.7.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
7
|
-
aistv-1.3.7.dist-info/top_level.txt,sha256=P6gyYzXFvBPESQyFZQSi6Rs8v5ALhw-d4UN2Jo9Pkgw,6
|
8
|
-
aistv-1.3.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|