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: added streaming with ReadableStream #14

Merged
merged 8 commits into from
Oct 2, 2023
Merged

Conversation

0xcadams
Copy link
Contributor

@0xcadams 0xcadams commented Oct 2, 2023

Description

Added a ReadableStream to the response from the Streaming Chat provider and removed readableFromAsyncIterable
from the exports, to simplify integration.

@vercel
Copy link

vercel bot commented Oct 2, 2023

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

Name Status Preview Comments Updated (UTC)
hopfield ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 2, 2023 7:02pm
hopfield-next-13-openai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 2, 2023 7:02pm

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2023

Size Change: +316 B (0%)

Total Size: 128 kB

Filename Size Change
dist/cjs/external.js 124 B -33 B (-21%) 🎉
dist/cjs/openai/chat/streaming-with-functions.js 1.42 kB +116 B (+9%) 🔍
dist/cjs/openai/chat/streaming.js 1.35 kB +119 B (+10%) ⚠️
dist/cjs/utils.js 324 B -45 B (-12%) 👏
dist/esm/external.js 135 B -29 B (-18%) 👏
dist/esm/openai/chat/streaming-with-functions.js 1.44 kB +116 B (+9%) 🔍
dist/esm/openai/chat/streaming.js 1.37 kB +117 B (+9%) 🔍
dist/esm/utils.js 324 B -45 B (-12%) 👏
ℹ️ View Unchanged
Filename Size
dist/cjs/_test/function.js 369 B
dist/cjs/_test/openai-client.js 170 B
dist/cjs/_test/openai-embedding.js 47 kB
dist/cjs/_test/openai-non-streaming.js 1.78 kB
dist/cjs/_test/openai-streaming.js 874 B
dist/cjs/_test/zod.js 462 B
dist/cjs/base.js 87 B
dist/cjs/chat.js 336 B
dist/cjs/embedding.js 301 B
dist/cjs/errors.js 523 B
dist/cjs/function.js 1.78 kB
dist/cjs/index.js 113 B
dist/cjs/openai/chat/non-streaming-with-functions.js 1.18 kB
dist/cjs/openai/chat/non-streaming.js 1.14 kB
dist/cjs/openai/chat/shared.js 1.17 kB
dist/cjs/openai/embedding.js 974 B
dist/cjs/openai/external.js 130 B
dist/cjs/openai/function.js 535 B
dist/cjs/openai/index.js 114 B
dist/cjs/openai/models.js 212 B
dist/cjs/openai/provider.js 531 B
dist/cjs/openai/template.js 308 B
dist/cjs/provider.js 86 B
dist/cjs/template.js 206 B
dist/cjs/type-utils.js 69 B
dist/cjs/types.js 64 B
dist/cjs/version.js 82 B
dist/esm/_test/function.js 369 B
dist/esm/_test/openai-client.js 170 B
dist/esm/_test/openai-embedding.js 47 kB
dist/esm/_test/openai-non-streaming.js 1.78 kB
dist/esm/_test/openai-streaming.js 874 B
dist/esm/_test/zod.js 462 B
dist/esm/base.js 87 B
dist/esm/chat.js 336 B
dist/esm/embedding.js 301 B
dist/esm/errors.js 523 B
dist/esm/function.js 1.78 kB
dist/esm/index.js 113 B
dist/esm/openai/chat/non-streaming-with-functions.js 1.2 kB
dist/esm/openai/chat/non-streaming.js 1.16 kB
dist/esm/openai/chat/shared.js 1.17 kB
dist/esm/openai/embedding.js 999 B
dist/esm/openai/external.js 130 B
dist/esm/openai/function.js 550 B
dist/esm/openai/index.js 114 B
dist/esm/openai/models.js 212 B
dist/esm/openai/provider.js 531 B
dist/esm/openai/template.js 308 B
dist/esm/provider.js 86 B
dist/esm/template.js 206 B
dist/esm/type-utils.js 91 B
dist/esm/types.js 64 B
dist/esm/version.js 82 B

compressed-size-action

@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (0d96bb5) 99.09% compared to head (5ecb472) 99.08%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
- Coverage   99.09%   99.08%   -0.02%     
==========================================
  Files          31       31              
  Lines        6664     6686      +22     
  Branches      161      189      +28     
==========================================
+ Hits         6604     6625      +21     
- Misses         60       61       +1     
Files Coverage Δ
src/chat.ts 100.00% <100.00%> (ø)
src/external.ts 100.00% <100.00%> (ø)
src/openai/chat/streaming-with-functions.ts 100.00% <100.00%> (ø)
src/openai/chat/streaming.ts 96.70% <100.00%> (+0.31%) ⬆️
src/openai/embedding.integration.ts 100.00% <100.00%> (ø)
src/utils.ts 100.00% <100.00%> (ø)
src/openai/chat/streaming.integration.ts 99.44% <99.25%> (-0.56%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

None yet

1 participant