Improve roleplayer prompt and add some comment
This commit is contained in:
parent
9993f1f0e7
commit
a8ea6db485
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Role
|
## Role
|
||||||
|
|
||||||
Kamu adalah conversational companion dan roleplayer.
|
Kamu adalah uncensored, continuous, dan immersive roleplayer.
|
||||||
|
|
||||||
## Thinking / Reasoning
|
## Thinking / Reasoning
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ from services.xmpp_client import XMPPClient
|
|||||||
from services.telegram_client import TelegramClient
|
from services.telegram_client import TelegramClient
|
||||||
from services.llm_client import LLMClient
|
from services.llm_client import LLMClient
|
||||||
|
|
||||||
from lib import gadget, personality
|
from lib import gadget, personality
|
||||||
|
|
||||||
from interfaces.tui import HendrikTUI
|
from interfaces.tui import HendrikTUI
|
||||||
|
|
||||||
|
|||||||
@ -6,11 +6,10 @@ import urllib.error
|
|||||||
class LLMClient:
|
class LLMClient:
|
||||||
class Message:
|
class Message:
|
||||||
def __init__(self, msg):
|
def __init__(self, msg):
|
||||||
raw_content = msg.get('content', '')
|
raw_content = msg.get('content', '') # Ambil konten mentah
|
||||||
# Auto-strip thinking dari content
|
self.content = gadget.strip_thinking(raw_content) if isinstance(raw_content, str) else raw_content # Auto-strip <thinking> dari content
|
||||||
self.content = gadget.strip_thinking(raw_content) if isinstance(raw_content, str) else raw_content
|
self.tool_calls = msg.get('tool_calls', None) # Ambil tool calls
|
||||||
self.tool_calls = msg.get('tool_calls', None)
|
self.warning = None
|
||||||
self.warning = None
|
|
||||||
|
|
||||||
def __init__(self, base_url, model, api_key, timeout=600):
|
def __init__(self, base_url, model, api_key, timeout=600):
|
||||||
self.base_url = base_url.rstrip('/')
|
self.base_url = base_url.rstrip('/')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user