ysharma HF staff commited on
Commit
519c2ce
·
1 Parent(s): 914e928

toggle to stream

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(user_input, chatbot):
30
 
31
  print(f"Chatbot : {chatbot}")
32
  chat = ChatOpenAI(temperature=1.0, streaming=True, model='gpt-3.5-turbo-0613')
@@ -44,7 +44,7 @@ def predict(user_input, chatbot):
44
  gpt_response = chat(messages)
45
  return gpt_response.content
46
 
47
- def predict_stream(inputs, chatbot):
48
 
49
  print(f"Chatbot : {chatbot}")
50
  messages = []
 
26
  # Example system message : system = SystemMessage(content = "You are a helpful AI assistant")
27
 
28
  # driver
29
+ def predict_langchain(user_input, chatbot):
30
 
31
  print(f"Chatbot : {chatbot}")
32
  chat = ChatOpenAI(temperature=1.0, streaming=True, model='gpt-3.5-turbo-0613')
 
44
  gpt_response = chat(messages)
45
  return gpt_response.content
46
 
47
+ def predict(inputs, chatbot):
48
 
49
  print(f"Chatbot : {chatbot}")
50
  messages = []