Spaces:
Build error
Build error
toggle to stream
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 |
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
|
| 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 = []
|