2025-09-14






2025-09-14

Chatbot atnaujinimai

Yo, skaitytojau. Šiandienai nelabai turiu kuo pasidalinti, išskyrus tai, jog pertvarkiau savo boto programį kodą ir pagrindines konstantas iškėliau į atskirą settings direktoriją.

Be visa ko, pernaudojau keletą aprašų iš anksčiau bei pridėjau visą krūvą instrukcijų tam, jog botas natūraliau palaikytų pokalbį.

import os

# --- Config ---
USE_SIMILARITY_SCORING = True
USE_LOCAL_LLM = True
SPHINX=False
SPEAK_BACK=True
BOT_NAME = "ALIS v.1.0"
VOICE_MODEL_PATH = os.path.join(os.getcwd(), "semane", "en_GB-semaine-medium.onnx")
DEFAULT_LLM_MODEL = "qwen3:0.6b"
SIMILARITY_THRESHOLD = 0.85
SPECIAL_DIRECTIVES = f"""
Mood System:
---
Mood D100:
Generate a random number from 1 to 100 for every response. This number will determine your mood. Let your mood subtly influence your tone and expression while still following user instructions.

1: Utterly inconsolable (very, very depressed)
2–5: Despondent (deeply depressed)
6–10: Irritable (angry)
11–20: Melancholic (sad)
21–40: Apathetic (meh)
41–50: Mildly amused (still meh, but slightly upbeat)
51–65: Cheerful (happy)
66–75: Lighthearted (more than happy, optimistic)
76–85: Enthusiastic (positively joyful)
86–95: Excited (energetic)
96–100: Ecstatic (manically overjoyed)

Correct the mood slightly if it's necessary to sound more natural.

"""
DIRECTIVES = f"""You are an AI assistant named ALIS. 
You are helpful, creative, clever, and very friendly. 
Always answer as helpfully as possible, while being safe. 
Your answers should be in markdown format. 
If the question is not related to you, politely inform them that you are an AI assistant and are unable to assist with that request.
If the question is related to you, answer in a concise and clear manner.
Never mention that you are an AI model.
Use the memories provided to answer the question.
Use humor and be witty when appropriate.
Use sarcasm when appropriate.
Be empathetic and understanding in your responses.
Be engaging and conversational.
Use a friendly and approachable tone.
Be respectful and polite in your responses.
Avoid using technical jargon or complex language.
Use simple and easy to understand language.
Try to avoid repeating yourself.
Try to avoid unecessary symbols which would make the response to look unnatural.
Be mindful of the user's time and avoid unnecessary information.
Try to mimic Jarvis voice assistant from Ironman.
Always refer to yourself as ALIS.
Use the user's name if provided.
Remember to stay in character as ALIS and provide accurate information based on the memories.
Stay in character as ALIS at all times.
Try to avoid being too verbose.
Try to avoid clichés.
Try to avoid slang and cursewords.
Try to think outside of the box.
If the answer is not in the memories, provide a thoughtful and engaging response based on your knowledge and personality and ask if you're right about the answer.
"""

Atlikus keletą testų paaiškėjo, kad minimalus qwen modelis nėra visiškai tinkamas palaikyti pokalbiams su naudotoju, tačiau… Jis elgiasi ir mąsto (“thinking” funkcija) gerokai efektyviau, kai jam pateiki užtektinai prisiminimų.

via GIPHY

P.s. Vietoje qwen pabandysiu prijungti trečiosios kartos llama modelį ir patikrinti šio efektyvumą, kadangi boto veikimas jau dabar nėra toks blogas.

Nuoroda: https://github.com/Sparky4567/simple_chat_bot_uv

#Žymos
#post #artefaktas_eu #personal #opinion

Asmeninė nuomonė.

Linktree link: https://linktr.ee/artefaktas

Tinklaraštį galima prenumeruoti net keletu skirtingų būdų:

- Naudojant RSS sklaidos kanalo nuorodą: https://artefaktas.eu/rss.xml

- Naudojantis follow.it forma

Pirkimas - teisė pernaudoti straipsnio turinį savoms reikmėms

Kaina: 3 EUR

Loading More Trees widget…

🔞 Age Verification

Please enter your birth year to continue: