let the bots know who they're talking to

This commit is contained in:
2026-03-10 13:00:50 -04:00
parent 7f5909690d
commit c70c6b2202

View File

@@ -359,7 +359,8 @@ async def talkforme(ctx, *, message: str):
prompt_history = [{"role": current_user, "content": topic}]
first_bot_response = llama_wrapper.chat_completion_with_history(
system_prompt=current_bot[1] + "\nKeep your responses under 2-3 sentences.",
system_prompt=current_bot[1]
+ f"\nKeep your responses under 2-3 sentences. You are talking to {current_bot[flip_counter(bot_counter)]}",
prompts=prompt_history, # type: ignore
openai_url=CHAT_ENDPOINT,
openai_api_key=CHAT_ENDPOINT_KEY,
@@ -377,7 +378,8 @@ async def talkforme(ctx, *, message: str):
logger.info(f"Current user is {current_user}")
logger.info(f"Current bot is {current_bot}")
bot_response = llama_wrapper.chat_completion_with_history(
system_prompt=current_bot[1] + "\nKeep your responses under 2-3 sentences.",
system_prompt=current_bot[1]
+ f"\nKeep your responses under 2-3 sentences. {current_bot[flip_counter(bot_counter)]}",
prompts=prompt_history, # type: ignore
openai_url=CHAT_ENDPOINT,
openai_api_key=CHAT_ENDPOINT_KEY,