let the bots know who they're talking to
This commit is contained in:
@@ -359,7 +359,8 @@ async def talkforme(ctx, *, message: str):
|
|||||||
prompt_history = [{"role": current_user, "content": topic}]
|
prompt_history = [{"role": current_user, "content": topic}]
|
||||||
|
|
||||||
first_bot_response = llama_wrapper.chat_completion_with_history(
|
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
|
prompts=prompt_history, # type: ignore
|
||||||
openai_url=CHAT_ENDPOINT,
|
openai_url=CHAT_ENDPOINT,
|
||||||
openai_api_key=CHAT_ENDPOINT_KEY,
|
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 user is {current_user}")
|
||||||
logger.info(f"Current bot is {current_bot}")
|
logger.info(f"Current bot is {current_bot}")
|
||||||
bot_response = llama_wrapper.chat_completion_with_history(
|
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
|
prompts=prompt_history, # type: ignore
|
||||||
openai_url=CHAT_ENDPOINT,
|
openai_url=CHAT_ENDPOINT,
|
||||||
openai_api_key=CHAT_ENDPOINT_KEY,
|
openai_api_key=CHAT_ENDPOINT_KEY,
|
||||||
|
|||||||
Reference in New Issue
Block a user