krrishD commited on
Commit
155b59a
1 Parent(s): 9448f41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- response = requests.get(endpoint + message).json()["response"]["output"]
 
 
 
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]