Spaces:
Sleeping
Sleeping
SushantGautam
commited on
Commit
•
305aec3
1
Parent(s):
c15e390
update with Resolver
Browse files
app.py
CHANGED
@@ -150,14 +150,15 @@ async def main(message: cl.Message):
|
|
150 |
cl.Action(name="option", value=value, label=value)
|
151 |
for value in element['top_matches']
|
152 |
]
|
153 |
-
|
154 |
-
|
|
|
155 |
actions=actions
|
156 |
).send()
|
157 |
selected_value = res.get("value", "") if res else ""
|
158 |
element[key] = selected_value
|
159 |
element.pop("top_matches")
|
160 |
-
await Choice(
|
161 |
# Get the cleaned prompt
|
162 |
cleaned_prompt = human_validate_func(need_input, validated, user_prompt)
|
163 |
else:
|
|
|
150 |
cl.Action(name="option", value=value, label=value)
|
151 |
for value in element['top_matches']
|
152 |
]
|
153 |
+
await cl.Message(author="Resolver", content=f"Need to identify the correct value for {key}: ").send()
|
154 |
+
res = await cl.AskActionMessage(author="Resolver",
|
155 |
+
content=f"Which one do you mean for {key}?",
|
156 |
actions=actions
|
157 |
).send()
|
158 |
selected_value = res.get("value", "") if res else ""
|
159 |
element[key] = selected_value
|
160 |
element.pop("top_matches")
|
161 |
+
await Choice("Options were "+ ", ".join([action.label for action in actions]))
|
162 |
# Get the cleaned prompt
|
163 |
cleaned_prompt = human_validate_func(need_input, validated, user_prompt)
|
164 |
else:
|