Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,11 @@ clerkieExamples=["how do I use langchain?", "How do I create an agent with custo
|
|
15 |
def chat(message, history):
|
16 |
print(message)
|
17 |
history = history or []
|
18 |
-
endpoint = os.environ.get("langchain_bot_api_endpoint")
|
19 |
-
|
|
|
|
|
|
|
20 |
# split on code
|
21 |
split_string = response.split("Code")
|
22 |
explanation = split_string[0]
|
|
|
15 |
def chat(message, history):
|
16 |
print(message)
|
17 |
history = history or []
|
18 |
+
# endpoint = os.environ.get("langchain_bot_api_endpoint")
|
19 |
+
endpoint = "https://clerkie-langchain-server-bot.ishaan-jaff.repl.co/langchain_agent?user_query="
|
20 |
+
user_query = "https://clerkie-langchain-server-bot.ishaan-jaff.repl.co/langchain_agent?user_query=" + message
|
21 |
+
print("user_query: ", user_query)
|
22 |
+
response = requests.get(user_query).json()["response"]["output"]
|
23 |
# split on code
|
24 |
split_string = response.split("Code")
|
25 |
explanation = split_string[0]
|