app.py
CHANGED
@@ -203,6 +203,7 @@ def ask_query(model, apiKey, query, accessList):
|
|
203 |
resp += '\n\n'
|
204 |
resp += 'Steps to solve answer using ReAct\n'
|
205 |
resp += 'You have access to the following recipe lists: \n' + accessListMsg
|
|
|
206 |
for i in range(len(stepsDict)):
|
207 |
resp += '##########################################\n'
|
208 |
resp += f'Step: {i+1} of {len(stepsDict)}\n'
|
@@ -225,15 +226,15 @@ with gr.Blocks() as demo:
|
|
225 |
|
226 |
with gr.Row():
|
227 |
with gr.Column():
|
228 |
-
headerMsg = "This demo shows
|
229 |
headerMsg += "the intent of this demo is to show how at LLM uses Tools to fetch information from two specific recipe lists. And how if a user does "
|
230 |
-
headerMsg += "not have access to a given recipe then the LLM will not be able to pull information from it."
|
231 |
gr.Markdown(headerMsg)
|
232 |
|
233 |
modelDD = gr.Dropdown(['gpt-3.5-turbo', 'gpt-4'], value='gpt-3.5-turbo', label="Model to use")
|
234 |
openAIKey = gr.Textbox(placeholder="Paste your OpenAI API Key Here", label="OpenAI API Key")
|
235 |
inp = gr.Textbox(placeholder="Type your question here...", label="Question")
|
236 |
-
accessCG = gr.CheckboxGroup(["Chicken recipes", "Desert recipes"], label="Access List", info="The recipes below are what you have access to")
|
237 |
btn = gr.Button("Run")
|
238 |
examples = ["Can you show tell me what ingredients I need for the first baked chicken recipe?",
|
239 |
"I have 15 guests coming to visit, if I make the 'Chocolate Snack Cake' recipe will there be enough? ",
|
|
|
203 |
resp += '\n\n'
|
204 |
resp += 'Steps to solve answer using ReAct\n'
|
205 |
resp += 'You have access to the following recipe lists: \n' + accessListMsg
|
206 |
+
resp += '\n'
|
207 |
for i in range(len(stepsDict)):
|
208 |
resp += '##########################################\n'
|
209 |
resp += f'Step: {i+1} of {len(stepsDict)}\n'
|
|
|
226 |
|
227 |
with gr.Row():
|
228 |
with gr.Column():
|
229 |
+
headerMsg = "This demo shows using LangChain Tools to <b>segregate of data</b> "
|
230 |
headerMsg += "the intent of this demo is to show how at LLM uses Tools to fetch information from two specific recipe lists. And how if a user does "
|
231 |
+
headerMsg += "not have access to a given recipe then the LLM will not be able to pull information from it. "
|
232 |
gr.Markdown(headerMsg)
|
233 |
|
234 |
modelDD = gr.Dropdown(['gpt-3.5-turbo', 'gpt-4'], value='gpt-3.5-turbo', label="Model to use")
|
235 |
openAIKey = gr.Textbox(placeholder="Paste your OpenAI API Key Here", label="OpenAI API Key")
|
236 |
inp = gr.Textbox(placeholder="Type your question here...", label="Question")
|
237 |
+
accessCG = gr.CheckboxGroup(["Chicken recipes", "Desert recipes"], value=["Chicken recipes", "Desert recipes"], label="Access List", info="The recipes below are what you have access to, deselect ones and ask specific questions to see how LLM cannot access them.")
|
238 |
btn = gr.Button("Run")
|
239 |
examples = ["Can you show tell me what ingredients I need for the first baked chicken recipe?",
|
240 |
"I have 15 guests coming to visit, if I make the 'Chocolate Snack Cake' recipe will there be enough? ",
|