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

feat: allow specifying middleware on the generate function #450

Closed
wants to merge 2 commits into from

Conversation

pavelgj
Copy link
Collaborator

@pavelgj pavelgj commented Jun 22, 2024

The idea is to be able to do things like

await generate({
  prompt: prompt,
  model: model,
  use: [
    retry({ maxRetries: 2 }),
    smoothStreaming({ cadence: 25, randomize: true })
  ],
})

@pavelgj
Copy link
Collaborator Author

pavelgj commented Jun 22, 2024

Nope... this is bad. Should not be allowed!!!

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.

1 participant