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

Clarified aborting examples and readme #157

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

ParthSareen
Copy link
Contributor

@ParthSareen ParthSareen commented Nov 5, 2024

  • Updated example to show the full impact of ollama.abort()
  • Removed example using AbortableAsyncIterator - the onus of managing a 1:1 mapping between stream to client is on the user if a client is not passed to the user - README specifies best practice under the abort section
  • Closes AbortableAsyncIterator type export #135

@ParthSareen ParthSareen self-assigned this Nov 5, 2024
Copy link
Collaborator

@BruceMacD BruceMacD left a comment

Choose a reason for hiding this comment

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

Minor comments about giving the models time to load into memory, but this seems like a good approach to this problem.

examples/abort/abort-all-requests.ts Outdated Show resolved Hide resolved
examples/abort/abort-single-request.ts Outdated Show resolved Hide resolved
Co-authored-by: Bruce MacDonald <brucewmacdonald@gmail.com>
Copy link
Collaborator

@BruceMacD BruceMacD left a comment

Choose a reason for hiding this comment

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

Thanks!

@ParthSareen
Copy link
Contributor Author

We've given it some thought and think it is best if stream management is done by the user. We'll move forward with 1 client per stream at the moment. Examples are updated to reflect this sentiment and add clarity.

@ParthSareen ParthSareen merged commit c97f231 into main Nov 5, 2024
3 checks passed
@ParthSareen ParthSareen deleted the parth/135-clarify-abort-examples branch November 5, 2024 23:40
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.

AbortableAsyncIterator type export
2 participants