You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The functionality I’m trying to implement is as follows:
1. A customer attempts to book a specific service.
2. The system checks whether all required inputs for that service have been provided.
3. If any required data is missing, we ask the customer to provide the missing information.
4. Once all necessary data is collected, we call the service reservation API.
I’m planning to use human-in-the-loop to handle steps 2, 3, and 4.
My approach:
When there is missing information, I trigger an interrupt to inform the customer about what is needed.
Then, once the customer replies, I want to extract any relevant data from their response and update the reservation data object accordingly.
The issue I’m facing:
It seems that every time I use an interrupt and receive a new message from the customer, the LLM gets re-invoked from the beginning. I’d like some advice on the best way to implement this — ideally in a way that avoids unnecessary repeated LLM calls at every interrupt.
`
prev_form_data = {...}
while True:
def check_validation():
'''
When the form data is fully completed: true
'''
if check_validation():
# When the form data is fully completed
pass
else :
# When more data is needed
message = interrupt()
extract_data = llm.invoke(message)
prev_form_data = {**prev_form_data, **extract_data}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We offer a variety of services to our customers.
The functionality I’m trying to implement is as follows:
1. A customer attempts to book a specific service.
2. The system checks whether all required inputs for that service have been provided.
3. If any required data is missing, we ask the customer to provide the missing information.
4. Once all necessary data is collected, we call the service reservation API.
I’m planning to use human-in-the-loop to handle steps 2, 3, and 4.
My approach:
When there is missing information, I trigger an interrupt to inform the customer about what is needed.
Then, once the customer replies, I want to extract any relevant data from their response and update the reservation data object accordingly.
The issue I’m facing:
It seems that every time I use an interrupt and receive a new message from the customer, the LLM gets re-invoked from the beginning. I’d like some advice on the best way to implement this — ideally in a way that avoids unnecessary repeated LLM calls at every interrupt.
`
`
Beta Was this translation helpful? Give feedback.
All reactions