добавит процент крутости у модели
This commit is contained in:
1 parent
b0541faa3d
commit
8812393f9f
4 files changed
+28
-4
No files matched your search
+11
-2
@@ -126,7 +126,13 @@ async def generate(
|
||||
await msg.edit_text(make_graph(message, process))
|
||||
|
||||
expanded = expand_auto_models()
|
||||
expanded = sorted(expanded, key=lambda e: get_trust(e.split("*"))[1], reverse=True)
|
||||
expanded = [
|
||||
e for _, e in sorted(
|
||||
enumerate(expanded),
|
||||
key=lambda x: get_trust(x[1].split("*"))[1] + (5 if x[0] == 0 else 0),
|
||||
reverse=True
|
||||
)
|
||||
]
|
||||
last_type = ""
|
||||
for entry in expanded:
|
||||
if last_type == "da":
|
||||
@@ -393,7 +399,10 @@ async def openai_generate_text(
|
||||
if s > 0:
|
||||
text += f"*... <{s} обрезано>*"
|
||||
if text == "":
|
||||
text = "(пустой ответ)"
|
||||
return {
|
||||
"type": "error",
|
||||
"text": "модель вернула пустой ответ"
|
||||
}
|
||||
return {
|
||||
"type": "da",
|
||||
"text": text
|
||||
|
||||
Reference in new issue
Block a user