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

first run report #9

Open
jchris opened this issue Nov 5, 2023 · 2 comments
Open

first run report #9

jchris opened this issue Nov 5, 2023 · 2 comments

Comments

@jchris
Copy link

jchris commented Nov 5, 2023

I just picked this up for a potential project and hit a couple of rough spots, thought it better to share:

A promise rejection was handled asynchronously. This warning occurs when attaching a catch handler to a promise after it rejected. (rejection #1)
A promise rejection was handled asynchronously. This warning occurs when attaching a catch handler to a promise after it rejected. (rejection #4)

User chat messages work, so I guess this is an AI integration thing. After another user message I see:

A promise rejection was handled asynchronously. This warning occurs when attaching a catch handler to a promise after it rejected. (rejection #5)
A promise rejection was handled asynchronously. This warning occurs when attaching a catch handler to a promise after it rejected. (rejection #8)

Sorry there's no pull request. The thing I'm building might make more sense to do partykit init on my existing UI anyway.

@jchris
Copy link
Author

jchris commented Nov 5, 2023

I chased the anonymous promise failure down to

  const stream = OpenAIStream(openaiResponse, {
    onStart: async () => onStartCallback(),
    onToken: async (token) => onTokenCallback(token),
  });

and neither of those callbacks get called. also this doesn't log:

  // @ts-ignore
  for await (const _ of stream) {
    // no-op, just read the stream, onToken callback above will handle the tokens
    console.log("stream", _);
  }

@threepointone
Copy link
Contributor

great catch, thank you! I'll have a look later this week.

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

No branches or pull requests

2 participants