transitive-bullshit / agentic

AI agent stdlib that works with any LLM and TypeScript AI SDK.
MIT License
16.07k stars 2.11k forks source link

After call AbortController. abort(), it did not stop immediately and only returned after timeout #631

Closed CytFree closed 1 month ago

CytFree commented 8 months ago

Verify latest release

Verify webapp is working

Environment details

node v16.20.2 os macOS 12.7.1

Describe the Bug

When using ChatGPTAPI, when I set the custom abortSignal and timeout, and the stream is true, and call abort(), the response will stop outputting, but the timeout is not canceled and will wait until the timeout is reached

image

pai4451 commented 7 months ago

I have the same issue

transitive-bullshit commented 1 month ago

This project is undergoing a major revamp; closing out old issues as part of the prep process.

The chatgpt package is pretty outdated at this point. I recommend that you use the openai package or the openai-fetch package instead.