@ai-sdk/angular 3.0.0-canary.159 → 3.0.0-canary.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/angular
2
2
 
3
+ ## 3.0.0-canary.160
4
+
5
+ ### Patch Changes
6
+
7
+ - ai@7.0.0-canary.160
8
+
3
9
  ## 3.0.0-canary.159
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -493,7 +493,14 @@ AI Gateway as the default provider, so no provider import is required.
493
493
  ### Express.js Chat Endpoint
494
494
 
495
495
  ```typescript
496
- import { convertToModelMessages, streamText } from 'ai';
496
+ import {
497
+ convertToModelMessages,
498
+ pipeTextStreamToResponse,
499
+ pipeUIMessageStreamToResponse,
500
+ streamText,
501
+ toTextStream,
502
+ toUIMessageStream,
503
+ } from 'ai';
497
504
  import express from 'express';
498
505
 
499
506
  const app = express();
@@ -507,7 +514,10 @@ app.post('/api/chat', async (req, res) => {
507
514
  messages: convertToModelMessages(messages),
508
515
  });
509
516
 
510
- result.pipeUIMessageStreamToResponse(res);
517
+ pipeUIMessageStreamToResponse({
518
+ response: res,
519
+ stream: toUIMessageStream({ stream: result.stream }),
520
+ });
511
521
  });
512
522
  ```
513
523
 
@@ -522,7 +532,10 @@ app.post('/api/completion', async (req, res) => {
522
532
  prompt,
523
533
  });
524
534
 
525
- result.pipeTextStreamToResponse(res);
535
+ pipeTextStreamToResponse({
536
+ response: res,
537
+ stream: toTextStream({ stream: result.stream }),
538
+ });
526
539
  });
527
540
  ```
528
541
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/angular",
3
- "version": "3.0.0-canary.159",
3
+ "version": "3.0.0-canary.160",
4
4
  "type": "module",
5
5
  "description": "Angular implementation of ai-sdk.",
6
6
  "license": "Apache-2.0",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@ai-sdk/provider-utils": "5.0.0-canary.44",
29
- "ai": "7.0.0-canary.159"
29
+ "ai": "7.0.0-canary.160"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "22.19.19",