-
Notifications
You must be signed in to change notification settings - Fork 80
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
Accessing Stream Chunks (Streamed generation) #36
Comments
sorry was planning to fix this earlier was in the middle of our big migration to a monorepo. looking into this now. |
fix in latest release |
I would like to reopen this issue. Number two, i dont understand on how to do it with .chat. I can see that it is suppose to return a Readable Stream, and i have set the stream to true. But i cannot get it to work. Any example or ideas @dosco ? |
@taieb-tk have you looked at the streaming1.ts and streaming2.ts examples? |
@dosco `const ai = new ax.AxAIOpenAI({
` Not sure what to do with the response in the next step... Could you possibly help me? :) |
Bump any help would be appriciated :) |
The bug is in the line below which is wrong. Also typescript should catch this it's even in the api docs. https://axllm.dev/apidocs/classes/axai/
It should be
|
The response is suppose to be asyncgenerator? Any examples on how to catch that stream? |
Ahh ok! I read a bit fast, i will try that! thanks!! :) |
use an async for loop like in the streaming examples
Vikram Rangnekar
…On Mon, Oct 14, 2024 at 12:56 PM taieb-tk ***@***.***> wrote:
The response is suppose to be asyncgenerator? Any examples on how to catch
that stream?
—
Reply to this email directly, view it on GitHub
<#36 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGLF277TMKA4E4RFB64GRDZ3QOWRAVCNFSM6AAAAABKDK5QRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJSGA4TINZSGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Your answer above solved my problem! Really appriciate the help. Looking forward to continue testing this 👍 |
I'm submitting a ...
[x] question about how to use this project
Summary
I'm encountering two problems when working with the streaming example:
examples/streaming2.ts
withstream: true
, I get an error:Missing required fields: answerInPoints
. What's causing this error and how can I resolve it?stream: true
, how can I access the result chunks? Are there methods similar tofor await (const chunk of result)
orcompletion.data.on()
that I can use to process the incoming stream? (Similar to How to use stream: true? openai/openai-node#18)Any guidance on resolving these issues would be greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered: