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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ import random
7
  import openai
8
  import re
9
  import gradio as gr
10
-
11
  """# Space Implementation"""
12
 
13
  clerkieExamples=["how do I use langchain?", "How do I create an agent with custom LLMChain?"]
@@ -15,7 +15,7 @@ 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 = 'https://clerkie-langchain-server-bot.ishaan-jaff.repl.co/langchain_agent?user_query='
19
  response = requests.get(endpoint + message).json()["response"]["output"]
20
  # split on code
21
  split_string = response.split("Code")
 
7
  import openai
8
  import re
9
  import gradio as gr
10
+ import os
11
  """# Space Implementation"""
12
 
13
  clerkieExamples=["how do I use langchain?", "How do I create an agent with custom LLMChain?"]
 
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")