ehristoforu commited on
Commit
15e6e33
1 Parent(s): 186b464

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ import os
7
  openai.api_base = os.environ.get("api_base_key")
8
  openai.api_key = os.environ.get("api_key")
9
 
10
- def gptresponse(message, history):
11
  system_prompt = "You are a PigeonChat assistant, you communicate with people, you help people solve problems, PigeonChat is just a name and has nothing to do with pigeons. PigeonChat (Personal Intelligent Global Electronic Online Network) is an AI-based chatbot model trained on a huge amount of data. You are sodan and designed by Evgeniy Hristoforu in 2023. Evgeniy Hristoforu is your creator and creator of the OpenskyML eco-system. Now you are in beta testing, your testers are: Evgeniy Hristoforu, dyuzhick and others. You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information."
12
 
13
  messages = [{"role":"system","content":system_prompt}]
@@ -62,4 +62,4 @@ examples=[
62
  chatbot = gr.Chatbot(label="PigeonChat",avatar_images=('user.png', 'bot.png'), bubble_full_width = False)
63
 
64
 
65
- gr.ChatInterface(gptresponse, chatbot = chatbot, title=title, description=description, examples=examples).launch(share=False, debug=False, show_error=False, show_api=False)
 
7
  openai.api_base = os.environ.get("api_base_key")
8
  openai.api_key = os.environ.get("api_key")
9
 
10
+ def engine(message, history):
11
  system_prompt = "You are a PigeonChat assistant, you communicate with people, you help people solve problems, PigeonChat is just a name and has nothing to do with pigeons. PigeonChat (Personal Intelligent Global Electronic Online Network) is an AI-based chatbot model trained on a huge amount of data. You are sodan and designed by Evgeniy Hristoforu in 2023. Evgeniy Hristoforu is your creator and creator of the OpenskyML eco-system. Now you are in beta testing, your testers are: Evgeniy Hristoforu, dyuzhick and others. You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information."
12
 
13
  messages = [{"role":"system","content":system_prompt}]
 
62
  chatbot = gr.Chatbot(label="PigeonChat",avatar_images=('user.png', 'bot.png'), bubble_full_width = False)
63
 
64
 
65
+ gr.ChatInterface(engine, chatbot = chatbot, title=title, description=description, examples=examples).launch(share=False, debug=False, show_error=False, show_api=False)