@downcity/city 0.2.192 → 0.2.196

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.
Files changed (32) hide show
  1. package/bin/index.d.ts +1 -0
  2. package/bin/index.d.ts.map +1 -1
  3. package/bin/index.js.map +1 -1
  4. package/bin/pact/invoker/ai/client-stream.d.ts +14 -0
  5. package/bin/pact/invoker/ai/client-stream.d.ts.map +1 -0
  6. package/bin/pact/invoker/ai/client-stream.js +129 -0
  7. package/bin/pact/invoker/ai/client-stream.js.map +1 -0
  8. package/bin/pact/invoker/ai/index.d.ts +12 -5
  9. package/bin/pact/invoker/ai/index.d.ts.map +1 -1
  10. package/bin/pact/invoker/ai/index.js +38 -16
  11. package/bin/pact/invoker/ai/index.js.map +1 -1
  12. package/bin/service/ai/ai-service.d.ts +4 -5
  13. package/bin/service/ai/ai-service.d.ts.map +1 -1
  14. package/bin/service/ai/ai-service.js +26 -28
  15. package/bin/service/ai/ai-service.js.map +1 -1
  16. package/bin/service/ai/language-model-stream.d.ts +9 -5
  17. package/bin/service/ai/language-model-stream.d.ts.map +1 -1
  18. package/bin/service/ai/language-model-stream.js +13 -10
  19. package/bin/service/ai/language-model-stream.js.map +1 -1
  20. package/bin/service/ai/provider.d.ts +12 -13
  21. package/bin/service/ai/provider.d.ts.map +1 -1
  22. package/bin/service/ai/provider.js +26 -47
  23. package/bin/service/ai/provider.js.map +1 -1
  24. package/bin/service/ai/types.d.ts +7 -9
  25. package/bin/service/ai/types.d.ts.map +1 -1
  26. package/bin/types/CityLanguageModelRuntime.d.ts +6 -9
  27. package/bin/types/CityLanguageModelRuntime.d.ts.map +1 -1
  28. package/package.json +2 -2
  29. package/bin/pact/invoker/ai/stream.d.ts +0 -8
  30. package/bin/pact/invoker/ai/stream.d.ts.map +0 -1
  31. package/bin/pact/invoker/ai/stream.js +0 -17
  32. package/bin/pact/invoker/ai/stream.js.map +0 -1
@@ -1,8 +0,0 @@
1
- /**
2
- * AI SDK UIMessage stream 解析(对应 AIService stream handler 的输出)。
3
- */
4
- import type { RawStreamBody } from "../../http.js";
5
- import type { UserStreamResult } from "../../user/types.js";
6
- /** 解析 AI SDK UIMessage SSE body */
7
- export declare function parseAIStreamBody(body: RawStreamBody): UserStreamResult;
8
- //# sourceMappingURL=stream.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../../src/pact/invoker/ai/stream.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,mCAAmC;AACnC,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,GAAG,gBAAgB,CAGvE"}
@@ -1,17 +0,0 @@
1
- /**
2
- * AI SDK UIMessage stream 解析(对应 AIService stream handler 的输出)。
3
- */
4
- import { DefaultChatTransport } from "ai";
5
- /** 解析 AI SDK UIMessage SSE body */
6
- export function parseAIStreamBody(body) {
7
- if (!body)
8
- throw new Error("Downcity stream response body is empty");
9
- return parser.parse(body);
10
- }
11
- class Parser extends DefaultChatTransport {
12
- parse(stream) {
13
- return this.processResponseStream(stream);
14
- }
15
- }
16
- const parser = new Parser();
17
- //# sourceMappingURL=stream.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../../src/pact/invoker/ai/stream.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAK1C,mCAAmC;AACnC,MAAM,UAAU,iBAAiB,CAAC,IAAmB;IACnD,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IACrE,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,MAAO,SAAQ,oBAA+B;IAClD,KAAK,CAAC,MAAkC;QACtC,OAAO,IAAI,CAAC,qBAAqB,CAAC,MAAqD,CAAC,CAAC;IAC3F,CAAC;CACF;AAED,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC"}