Open jbdatascience opened 1 year ago
Yes
Just create single pinpongs (list) Then share it with two different prompt objects
Yes
Just create single pinpongs (list) Then share it with two different prompt objects
Interesting! Could you show a piece of Python could to do just that ?
for example, lets say you want to switch between different prompting styles of from Alapca
and StableLM
while underlying chats are shared
from pingpong.gradio import GradioAlpacaChatPPManager
from pingpong.gradio import GradioStableLMChatPPManager
pingpongs = []
alpaca = GradioAlpacaChatPPManager()
stablelm = GradioStableLMChatPPManager()
alpaca.ctx = "this is a context"
alpaca.pingpongs = pingpongs
stablelm.ctx = "this is a context"
stablelm.pingpongs = pingpongs
alpaca.add_ping("hello") # starting prompt
prompt_for_stablelm = stablelm.build_prompts()
stablelm.add_pong(generate(prompt_for_stablelm)) # generate is a function to generate text based on given prompt
prompt_for_alpaca = alpaca.build_prompts()
alpaca.add_pong(generate(prompt_for_alpaca))
...
Thank you. I will try this out and see where it takes me!
I wonder: Can Ping Pong principle be applied to let 2 LLM Chatbots talk to each other fully automatically?