Skip to content

Instantly share code, notes, and snippets.

@sunilkumardash9
Created April 28, 2023 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunilkumardash9/907b6eb4203552e51837ae828af12b59 to your computer and use it in GitHub Desktop.
Save sunilkumardash9/907b6eb4203552e51837ae828af12b59 to your computer and use it in GitHub Desktop.
def add_text(history, text):
global messages #message[list] is defined globally
history = history + [(text,'')]
messages = messages + [{"role":'user', 'content': text}]
return history, ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment