Optimisation performance (30t/s --> 50t/s) & adaptation parsing json --> llama.cpp & Fix système mémoire
This commit is contained in:
parent
e27b60e60c
commit
0ba47f8363
19 changed files with 457 additions and 123 deletions
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"resume_global": "",
|
||||
"historique_recent": [
|
||||
{
|
||||
"timestamp": "2026-01-28T15:48:16.572749+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Je suis disponible tous les jour entre 18h10 et 21h30 et tous les week-end",
|
||||
"bot_message": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -96,6 +96,18 @@
|
|||
"channel_id": 1456784303995228344,
|
||||
"user_message": "<@1370716551485067304> mute <@727188532669448509>",
|
||||
"bot_message": "{\"action\": \"MUTE\", \"users\": [{\"target_user_mention\": \"@Nuggets Au Caviar\", \"duration\": 60}]}"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T12:17:42.962935+00:00",
|
||||
"channel_id": 1456784303995228344,
|
||||
"user_message": "<@1370716551485067304> salut mon cœur",
|
||||
"bot_message": "...\n\nWe need to follow the protocol: The user says \"salut mon cœur\". The bot is not directly addressed (no mention of Beta/Bêta). The rule: If not directly addressed, stay silent in the public channel. So we must produce a JSON with action \"NONE\" and maybe no response? The spec says \"If you are not directly addressed, stay SILENT\". So we should output ? The JSON schema requires a response field? The spec for \"NONE\" says: : Réponse directe. But we are to stay silent, meaning no response. In that case perhaps we output or maybe we should output no JSON? But we must produce a JSON block. The spec says produce only JSON block, no extra text. If we need to stay silent, maybe we output . That would be a direct response with empty. Or maybe we produce ? The spec says \"STRICT JSON WITH DOUBLE QUOTES\". The action \"NONE\" expects a response field. But maybe it's optional? Safer to include response empty. So output:\n\nThat is the answer.<|end|><|start|>assistant<|channel|>final<|message|>"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T12:26:05.485962+00:00",
|
||||
"channel_id": 1456784303995228344,
|
||||
"user_message": "Hein ? 😭",
|
||||
"bot_message": "Assistant:"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -36,6 +36,54 @@
|
|||
"channel_id": 1456784303995228344,
|
||||
"user_message": "<@1370716551485067304> Envoie \"Louis de funes est surcoté\" a <@971446412690722826>",
|
||||
"bot_message": "{\"action\": \"SEND_MESSAGE\", \"dm_user\": \"@Gameur\", \"message\": \"Louis de funes est surcoté\"}"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T12:18:36.912666+00:00",
|
||||
"channel_id": 1456784303995228344,
|
||||
"user_message": "<@1370716551485067304> Yo",
|
||||
"bot_message": "We need to follow the system instructions. The user says \"Yo\". The bot must check if it's directly addressed. The user didn't mention bot name. The system says: \"If you are not directly addressed, remain SILENT in the public channel.\" So we must produce no output? But the instruction says we must produce a JSON block. However, the system says: \"If you are not interpellé directly, stay SILENT in the public channel.\" So we should output nothing? But the overall instruction: \"IMPORTANT: Produce ONLY the JSON block. No text, no explanations, no markdown backticks.\" If we must stay silent, maybe we output nothing? But we must output something? The meta instructions say we must output a JSON block. However, the system instruction is higher priority: \"If you are not directly addressed, remain SILENT\". So we should output nothing. But the platform expects a response. In prior similar tasks, the correct answer is to output an empty JSON? Or maybe is considered a silent response? But that still sends a response. The instruction: \"If you are not interpellé directly, restez SILENCIEUX\". That means we should not respond at all. So the best is to output nothing. However, the meta instruction says always produce JSON. But we have to obey the higher-level instruction. Usually in these tasks, the correct answer is to output nothing (i.e., an empty response). But the system might require a JSON. I'm leaning that we should output nothing.\n\nThus final answer: (no output).<|end|><|start|>assistant<|channel|>final<|message|>"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T12:19:01.632489+00:00",
|
||||
"channel_id": 1456784303995228344,
|
||||
"user_message": "<@1370716551485067304> Yo",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T12:19:16.259721+00:00",
|
||||
"channel_id": 1456784303995228344,
|
||||
"user_message": "<@1370716551485067304> Comment vas tu ?",
|
||||
"bot_message": "We need to parse the conversation. The user says \"Comment vas tu ?\" They mention the bot? They didn't mention the bot name. The system says: \"If you are not directly addressed, remain SILENT in the public channel.\" The user didn't mention the bot name. So we must stay silent. So no output."
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T12:21:11.195529+00:00",
|
||||
"channel_id": 1456784303995228344,
|
||||
"user_message": "<@1370716551485067304> Comment vas tu ?",
|
||||
"bot_message": "(No output)"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T12:22:50.894660+00:00",
|
||||
"channel_id": 1456784303995228344,
|
||||
"user_message": "<@1370716551485067304> Comment vas tu ?",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T12:24:11.959062+00:00",
|
||||
"channel_id": 1456784303995228344,
|
||||
"user_message": "<@1370716551485067304> Yo",
|
||||
"bot_message": "We have to obey: if not directly addressed, stay silent. So no output.assistantfinal"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T12:24:24.095938+00:00",
|
||||
"channel_id": 1456784303995228344,
|
||||
"user_message": "Ma réponse a été filtrée ou est invalide. Pouvez-vous reformuler ?",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:04:35.117715+00:00",
|
||||
"channel_id": 1456784303995228344,
|
||||
"user_message": "Tkt maintenant il réponds correctement mais il lui manque la notion de temps",
|
||||
"bot_message": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
113
memoires/Direct/971446412690722826.json
Normal file
113
memoires/Direct/971446412690722826.json
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
{
|
||||
"resume_global": "",
|
||||
"historique_recent": [
|
||||
{
|
||||
"timestamp": "2026-03-22T13:10:11.227046+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "coucou",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:10:20.594703+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Je ne sais pas",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:10:54.669183+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "EN ne faisant rien",
|
||||
"bot_message": "We have a conversation: user says \"coucou\", then \"Je ne sais pas\", then \"EN ne faisant rien\". The system says we are in direct interaction mode (interpellated). We must respond with a JSON with action \"NONE\" and a response. The user is speaking French, greeting \"coucou\". They seem to be maybe wanting a response. We should respond naturally and helpfully. Possibly ask how we can help. The instruction: If mentioned or interpellated by name, respond. Here they didn't mention name, but we are in direct mode because we were interpellated? The system says \"Vous avez été interpellé par l'utilisateur\". So we must respond.\n\nThus produce JSON: .\n\nWe need to respond in French, natural. Something like \"Coucou ! Comment puis-je t'aider aujourd'hui ?\" Also note no ellipsis. Must be full sentence.\n\nThus output JSON only."
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:14:09.691019+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "COucou",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:14:22.017138+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "En ne faisant rien",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:14:38.928724+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Je viens de te dire que rien",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:14:53.113117+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Si je sais",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:15:00.657283+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Est-ce que tu peux coder ?",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:15:51.005268+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Tu peux me faire un code qui va trouver un petit copain sur internet ?",
|
||||
"bot_message": "\\n\\nheaders = {\\n \\\"Authorization\\\": f\\\"Bearer {API_TOKEN}\\\",\\n \\\"Accept\\\": \\\"application/json\\\"\\n}\\n\\ndef rechercher_profil():\\n \\\"\\\"\\\"Envoie la requête de recherche et retourne les profils correspondants.\\\"\\\"\\\"\\n response = requests.get(API_URL, params=params, headers=headers)\\n if response.status_code == 200:\\n data = response.json()\\n # Supposons que l'API renvoie une liste de profils sous la clé \\\"results\\\"\\n profils = data.get(\\\"results\\\", [])\\n for profil in profils:\\n print(f\\\"Nom : {profil.get('first_name')} {profil.get('last_name')}\\\")\\n print(f\\\"Âge : {profil.get('age')}\\\")\\n print(f\\\"Ville : {profil.get('city')}\\\")\\n print(f\\\"Description : {profil.get('bio')[:100]}…\\\")\\n print(\\\"---\\\")\\n else:\\n print(f\\\"Erreur {response.status_code} : {response.text}\\\")\\n\\nif __name__ == \\\"__main__\\\":\\n rechercher_profil()\\n\\n\\n### Points à retenir\\n1. **Authentification** – La plupart des API de sites de rencontres requièrent un token d’accès (OAuth2, JWT, etc.).\\n2. **Respect des règles** – Ne dépasse pas les limites de requêtes imposées par le service et ne collecte pas de données sensibles sans consentement.\\n3. **RGPD** – Si tu stockes ou traites des données personnelles, assure‑toi d’obtenir le consentement explicite des personnes concernées et de pouvoir les effacer sur demande.\\n4. **Sécurité** – Ne partage jamais ton token d’accès dans du code public ou sur des dépôts non sécurisés.\\n\\nCe script te donne une base ; tu peux l’enrichir (tri par affinité, envoi de messages automatisés, etc.) tout en restant dans le cadre légal et éthique. Bon codage !\"}"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:16:33.807035+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Merci",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:17:02.768212+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Sinon en gros tu as été conçu pour faire quoi ?",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:32:25.380685+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Ok je vois que tu fonctionnes bien, c'est moi ton devellopeur",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:32:56.296630+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Oui tu l'as déjà dis tout ça je te dis juste que je suis ton dev",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:36:41.575481+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Ok je vois que tu fonctionnes bien, c'est moi ton devellopeur",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:37:08.654222+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "C'ets très bien tout ça alros",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:37:49.438903+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Ok ok pas la peine de te répéter j'ai compris",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:41:09.392113+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Ok je vois que tu fonctionnes bien, c'est moi ton devellopeur",
|
||||
"bot_message": ""
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-03-22T13:41:33.172164+00:00",
|
||||
"channel_id": 1446543407605354608,
|
||||
"user_message": "Très bien !",
|
||||
"bot_message": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resume_global": "",
|
||||
"historique_recent": [
|
||||
{
|
||||
"timestamp": "2026-03-22T13:03:42.697534+00:00",
|
||||
"channel_id": 1461454523754086461,
|
||||
"user_message": "<@727188532669448509> \n<@353942721997832195>",
|
||||
"bot_message": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue