ysharma HF staff commited on
Commit
85d08a7
·
1 Parent(s): 281c3bf

toggle to langchain eg

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -26,7 +26,7 @@ from langchain.tools import AIPluginTool
26
  # Example system message : system = SystemMessage(content = "You are a helpful AI assistant")
27
 
28
  # driver
29
- def predict_old(user_input, chatbot):
30
 
31
  chat = ChatOpenAI(temperature=1.0, streaming=True, model='gpt-3.5-turbo-0613')
32
  messages=[]
@@ -69,6 +69,6 @@ def predict(inputs, chatbot):
69
  partial_message = partial_message + chunk['choices'][0]['delta']['content']
70
  yield partial_message
71
 
72
- ChatInterface(predict, delete_last_btn="❌Delete").queue().launch(debug=True)
73
 
74
- #gr.ChatInterface(predict, delete_last_btn="del").queue().launch(share=False, debug=True) #examples=["How are you?", "What's up?"],
 
26
  # Example system message : system = SystemMessage(content = "You are a helpful AI assistant")
27
 
28
  # driver
29
+ def predict(user_input, chatbot):
30
 
31
  chat = ChatOpenAI(temperature=1.0, streaming=True, model='gpt-3.5-turbo-0613')
32
  messages=[]
 
69
  partial_message = partial_message + chunk['choices'][0]['delta']['content']
70
  yield partial_message
71
 
72
+ #ChatInterface(predict, delete_last_btn="❌Delete").queue().launch(debug=True)
73
 
74
+ gr.ChatInterface(predict, delete_last_btn="del").queue().launch(share=False, debug=True) #examples=["How are you?", "What's up?"],