added global statistics
This commit is contained in:
1 parent
f9207e1f99
commit
8861fbbb4b
5 files changed
+91
No files matched your search
@@ -6,6 +6,7 @@ from configparser import DEFAULTSECT
|
||||
|
||||
from openai import AsyncOpenAI
|
||||
|
||||
from statistics import *
|
||||
from colors import *
|
||||
from config import *
|
||||
|
||||
@@ -111,6 +112,11 @@ def remove_think_tags(text):
|
||||
return result
|
||||
|
||||
|
||||
def get_all_users():
|
||||
with shelve.open("users") as db:
|
||||
return {k: db[k] for k in db.keys()}
|
||||
|
||||
|
||||
def get_all_user_ids():
|
||||
ids = []
|
||||
with shelve.open("users") as db:
|
||||
@@ -195,6 +201,8 @@ async def generate(
|
||||
|
||||
text = ""
|
||||
|
||||
add_one_to("stats/gens")
|
||||
|
||||
client = providers[model[0]]
|
||||
text = await openai_generate_text(
|
||||
oai=client,
|
||||
|
||||
Reference in new issue
Block a user