SushantGautam commited on
Commit
305aec3
1 Parent(s): c15e390

update with Resolver

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- res = await cl.AskActionMessage(
154
- content=f"Select the correct value for {key}", # Assuming 'key' is a variable you meant to replace
 
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(selected_value) # Logging 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: