Spaces:
Build error
Build error
toggle to langchain eg
Browse files
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
|
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 |
-
|
|
|
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?"],
|