Skip to content
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

Merged
merged 10 commits into from
Dec 16, 2024
Merged

docs: adding more comprehensive documentation #130

merged 10 commits into from
Dec 16, 2024

Conversation

grabbou
Copy link
Collaborator

@grabbou grabbou commented Dec 15, 2024

We've added a bunch of features lately, so let's make sure we document them all!

@grabbou grabbou marked this pull request as ready for review December 16, 2024 04:43
@grabbou grabbou requested a review from pkarw December 16, 2024 04:43
@grabbou grabbou changed the title docs: adding more comprehensive documentation into the project readme docs: adding more comprehensive documentation Dec 16, 2024
Copy link
Contributor

@kraenhansen kraenhansen left a 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 👍

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved

### 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
in case total number of iterations exeeceds available threshold.
in case the total number of iterations exceeds a threshold of available iterations.

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
/** read state from the cache */

/** run the workflow */
const state = await teamwork(workflow, prevState, false)
Copy link
Contributor

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 })

Copy link
Collaborator

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

Copy link
Collaborator Author

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.
Copy link
Contributor

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkarw and others added 4 commits December 16, 2024 10:17
Co-authored-by: Kræn Hansen <[email protected]>
Co-authored-by: Kræn Hansen <[email protected]>
Co-authored-by: Kræn Hansen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants