fix: pass Teto system prompt via Vertex system_instruction
This commit is contained in:
parent
3dd6a02dfb
commit
a5a26f8465
@ -87,15 +87,18 @@ class DmbotTetoCog(commands.Cog):
|
||||
"When expressing emotions, never use emojis and instead use text-based emoticons like :) and ;) as well as Japanese-style emoticons, for example >~<, ^~^, >///<, UwU, o.O, and OwO over emojis. \n"
|
||||
"Reply to the user in a short, conversational manner, staying in character."
|
||||
)
|
||||
contents = [types.Content(role="system", parts=[types.Part(text=system_prompt)])]
|
||||
contents = []
|
||||
for msg in messages:
|
||||
role = "user" if msg.get("role") == "user" else "model"
|
||||
contents.append(types.Content(role=role, parts=[types.Part(text=msg.get("content", ""))]))
|
||||
contents.append(
|
||||
types.Content(role=role, parts=[types.Part(text=msg.get("content", ""))])
|
||||
)
|
||||
|
||||
generation_config = types.GenerateContentConfig(
|
||||
temperature=1.0,
|
||||
max_output_tokens=2000,
|
||||
safety_settings=STANDARD_SAFETY_SETTINGS,
|
||||
system_instruction=types.Content(role="system", parts=[types.Part(text=system_prompt)]),
|
||||
)
|
||||
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user