-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: adding more comprehensive documentation #130
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of great improvements - it reads a lot better and I get a feeling that I understand what to use this for 👍
|
||
### Workflows | ||
Final Boss, `finalBoss`, is responsible for wrapping up the workflow and providing a final output, | ||
in case total number of iterations exeeceds available threshold. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case total number of iterations exeeceds available threshold. | |
in case the total number of iterations exceeds a threshold of available iterations. |
/** read state from the cache */ | ||
|
||
/** run the workflow */ | ||
const state = await teamwork(workflow, prevState, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Positional boolean arguments are an endless source of bugs and confusion. I'd suggest changing that API to take an options object, even if it only has a single option at this time.
const state = await teamwork(workflow, prevState, { executeTools: false })
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grabbou ? If so maybe let's make a task out if this suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, good idea! Thanks @kraenhansen!
|
||
Passing second argument to `teamwork` is optional. If you don't provide it, root state will be created automatically. Otherwise, it will be used as a starting point for the next iteration. | ||
|
||
Last argument is a boolean flag that determines if tools should be executed. If you set it to `false`, you are responsible for calling tools manually. Teamwork will stop iterating over the workflow and return the current state with `paused` status. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be updated if you choose to alter the teamwork
function to take a third optional options object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Kræn Hansen <[email protected]>
Co-authored-by: Kræn Hansen <[email protected]>
Co-authored-by: Kræn Hansen <[email protected]>
Co-authored-by: Kræn Hansen <[email protected]>
We've added a bunch of features lately, so let's make sure we document them all!