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

add opt for passing abort signal to chatCompletion function #37

Merged
merged 3 commits into from
May 31, 2024

Conversation

cfortuner
Copy link
Contributor

@cfortuner cfortuner commented May 31, 2024

Attempts to add the option to pass an abort signal through to the chatCompletion function.

(This isn't fully working yet.)

Notes:

  • Aborting the request seems to only work semi-consistently.
  • For Streaming, the work around is to just check if the signal is aborted when the chunk is received and handle it there.

TLDR still investigating how to abort properly

Copy link

vercel bot commented May 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dexter ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 11:26pm

src/model/types.ts Outdated Show resolved Hide resolved
src/model/chat.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@rileytomasek rileytomasek left a comment

Choose a reason for hiding this comment

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

looks good 👍🏻

src/model/model.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@rileytomasek rileytomasek left a comment

Choose a reason for hiding this comment

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

👌🏻

@cfortuner cfortuner merged commit fb20026 into master May 31, 2024
6 checks passed
@rileytomasek rileytomasek deleted the chat-abort-signal branch November 11, 2024 17:06
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.

2 participants