Skip to content

How to implement human in the loop? #165

Answered by boyangsvl
qiankunli asked this question in Q&A
Discussion options

You must be logged in to vote

We are working on making the documents clearer. @polong-lin

This is what you do for human-in-the-loop:

  1. You define a long running function and give it to the agent to kick off the human review. E.g. request_approval(...)
  2. When needed, the agent will call that function.
  3. In your function body, you write the code to kick off the work. E.g. send the approval request as a message to someone.
  4. You can optionally return an intermediate result from your long running function, e.g. {'status': 'pending', 'eta': '2 days'}. The agent will use this info to formulate a response.
  5. At this point the agent will finish executing because it knows that it needs to wait for the response of that long running func…

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@MahorShekhar
Comment options

Answer selected by boyangsvl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants