@apicity/fireworks 0.6.7 → 0.7.0

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/README.md CHANGED
@@ -1584,14 +1584,14 @@ Source: [`packages/provider/fireworks/src/fireworks.ts`](src/fireworks.ts)
1584
1584
  </details>
1585
1585
 
1586
1586
  <details>
1587
- <summary><code>POST</code> <b><code>fireworks.inference.v1.messages</code></b></summary>
1587
+ <summary><code>POST</code> <b><code>fireworks.inference.v1.rerank</code></b></summary>
1588
1588
 
1589
- <code>POST https://api.fireworks.ai/inference/v1/messages</code>
1589
+ <code>POST https://api.fireworks.ai/inference/v1/rerank</code>
1590
1590
 
1591
1591
  [Upstream docs ↗](https://docs.fireworks.ai/api-reference)
1592
1592
 
1593
1593
  ```typescript
1594
- const res = await fireworks.inference.v1.messages({ /* ... */ });
1594
+ const res = await fireworks.inference.v1.rerank({ /* ... */ });
1595
1595
  ```
1596
1596
 
1597
1597
  Source: [`packages/provider/fireworks/src/fireworks.ts`](src/fireworks.ts)
@@ -1599,14 +1599,14 @@ Source: [`packages/provider/fireworks/src/fireworks.ts`](src/fireworks.ts)
1599
1599
  </details>
1600
1600
 
1601
1601
  <details>
1602
- <summary><code>POST</code> <b><code>fireworks.inference.v1.rerank</code></b></summary>
1602
+ <summary><code>POST</code> <b><code>fireworks.inference.v1.accounts.users.update</code></b></summary>
1603
1603
 
1604
- <code>POST https://api.fireworks.ai/inference/v1/rerank</code>
1604
+ <code>POST https://api.fireworks.ai/v1/accounts/{accountId}/users/{userId}</code>
1605
1605
 
1606
1606
  [Upstream docs ↗](https://docs.fireworks.ai/api-reference)
1607
1607
 
1608
1608
  ```typescript
1609
- const res = await fireworks.inference.v1.rerank({ /* ... */ });
1609
+ const res = await fireworks.inference.v1.accounts.users.update({ /* ... */ });
1610
1610
  ```
1611
1611
 
1612
1612
  Source: [`packages/provider/fireworks/src/fireworks.ts`](src/fireworks.ts)
@@ -1614,14 +1614,14 @@ Source: [`packages/provider/fireworks/src/fireworks.ts`](src/fireworks.ts)
1614
1614
  </details>
1615
1615
 
1616
1616
  <details>
1617
- <summary><code>POST</code> <b><code>fireworks.inference.v1.accounts.users.update</code></b></summary>
1617
+ <summary><code>POST</code> <b><code>fireworks.inference.v1.messages</code></b></summary>
1618
1618
 
1619
- <code>POST https://api.fireworks.ai/v1/accounts/{accountId}/users/{userId}</code>
1619
+ <code>POST https://api.fireworks.ai/inference/v1/messages</code>
1620
1620
 
1621
1621
  [Upstream docs ↗](https://docs.fireworks.ai/api-reference)
1622
1622
 
1623
1623
  ```typescript
1624
- const res = await fireworks.inference.v1.accounts.users.update({ /* ... */ });
1624
+ const res = await fireworks.inference.v1.messages({ /* ... */ });
1625
1625
  ```
1626
1626
 
1627
1627
  Source: [`packages/provider/fireworks/src/fireworks.ts`](src/fireworks.ts)
@@ -0,0 +1,23 @@
1
+ export interface ChatToolCall {
2
+ id: string;
3
+ type: "function";
4
+ function: {
5
+ name: string;
6
+ arguments: string;
7
+ };
8
+ }
9
+ export interface ChatUsage {
10
+ prompt_tokens: number;
11
+ completion_tokens: number;
12
+ total_tokens: number;
13
+ }
14
+ export interface ChatChoice {
15
+ index: number;
16
+ message: {
17
+ role: string;
18
+ content: string | null;
19
+ tool_calls?: ChatToolCall[];
20
+ };
21
+ finish_reason: string;
22
+ }
23
+ //# sourceMappingURL=chat-fragments-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-fragments-types.d.ts","sourceRoot":"","sources":["../../src/chat-fragments-types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;KAC7B,CAAC;IACF,aAAa,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=chat-fragments-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-fragments-types.js","sourceRoot":"","sources":["../../src/chat-fragments-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,53 @@
1
+ import { z } from "zod";
2
+ export declare const ChatTextPartSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"text">;
4
+ text: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export declare const ChatImageUrlPartSchema: z.ZodObject<{
7
+ type: z.ZodLiteral<"image_url">;
8
+ image_url: z.ZodObject<{
9
+ url: z.ZodString;
10
+ detail: z.ZodOptional<z.ZodEnum<{
11
+ auto: "auto";
12
+ low: "low";
13
+ high: "high";
14
+ }>>;
15
+ }, z.core.$strip>;
16
+ }, z.core.$strip>;
17
+ export declare const ChatContentPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
18
+ type: z.ZodLiteral<"text">;
19
+ text: z.ZodString;
20
+ }, z.core.$strip>, z.ZodObject<{
21
+ type: z.ZodLiteral<"image_url">;
22
+ image_url: z.ZodObject<{
23
+ url: z.ZodString;
24
+ detail: z.ZodOptional<z.ZodEnum<{
25
+ auto: "auto";
26
+ low: "low";
27
+ high: "high";
28
+ }>>;
29
+ }, z.core.$strip>;
30
+ }, z.core.$strip>], "type">;
31
+ export declare const ChatToolFunctionSchema: z.ZodObject<{
32
+ name: z.ZodString;
33
+ description: z.ZodOptional<z.ZodString>;
34
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
35
+ }, z.core.$strip>;
36
+ export declare const ChatToolSchema: z.ZodObject<{
37
+ type: z.ZodLiteral<"function">;
38
+ function: z.ZodObject<{
39
+ name: z.ZodString;
40
+ description: z.ZodOptional<z.ZodString>;
41
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
42
+ }, z.core.$strip>;
43
+ }, z.core.$strip>;
44
+ export declare const ChatToolChoiceSchema: z.ZodUnion<readonly [z.ZodEnum<{
45
+ auto: "auto";
46
+ none: "none";
47
+ }>, z.ZodObject<{
48
+ type: z.ZodLiteral<"function">;
49
+ function: z.ZodObject<{
50
+ name: z.ZodString;
51
+ }, z.core.$strip>;
52
+ }, z.core.$strip>]>;
53
+ //# sourceMappingURL=chat-fragments-zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-fragments-zod.d.ts","sourceRoot":"","sources":["../../src/chat-fragments-zod.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;iBAMjC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;2BAGhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;iBAIjC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;iBAGzB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;mBAM/B,CAAC"}
@@ -0,0 +1,35 @@
1
+ // AUTO-GENERATED from shared/provider-src/chat-fragments-zod.ts; do not edit.
2
+ // Edit the canonical file and run `pnpm run gen:shared`.
3
+ import { z } from "zod";
4
+ export const ChatTextPartSchema = z.object({
5
+ type: z.literal("text"),
6
+ text: z.string(),
7
+ });
8
+ export const ChatImageUrlPartSchema = z.object({
9
+ type: z.literal("image_url"),
10
+ image_url: z.object({
11
+ url: z.string(),
12
+ detail: z.enum(["auto", "low", "high"]).optional(),
13
+ }),
14
+ });
15
+ export const ChatContentPartSchema = z.discriminatedUnion("type", [
16
+ ChatTextPartSchema,
17
+ ChatImageUrlPartSchema,
18
+ ]);
19
+ export const ChatToolFunctionSchema = z.object({
20
+ name: z.string(),
21
+ description: z.string().optional(),
22
+ parameters: z.record(z.string(), z.unknown()).optional(),
23
+ });
24
+ export const ChatToolSchema = z.object({
25
+ type: z.literal("function"),
26
+ function: ChatToolFunctionSchema,
27
+ });
28
+ export const ChatToolChoiceSchema = z.union([
29
+ z.enum(["auto", "none"]),
30
+ z.object({
31
+ type: z.literal("function"),
32
+ function: z.object({ name: z.string() }),
33
+ }),
34
+ ]);
35
+ //# sourceMappingURL=chat-fragments-zod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-fragments-zod.js","sourceRoot":"","sources":["../../src/chat-fragments-zod.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,yDAAyD;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC;QAClB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;KACnD,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAChE,kBAAkB;IAClB,sBAAsB;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,QAAQ,EAAE,sBAAsB;CACjC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC;IAC1C,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;QAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;KACzC,CAAC;CACH,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fireworks.d.ts","sourceRoot":"","sources":["../../src/fireworks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAgJhB,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAkEjB,wBAAgB,eAAe,CAAC,IAAI,EAAE,gBAAgB,GAAG,iBAAiB,CA4/FzE"}
1
+ {"version":3,"file":"fireworks.d.ts","sourceRoot":"","sources":["../../src/fireworks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAgJhB,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAmIjB,wBAAgB,eAAe,CAAC,IAAI,EAAE,gBAAgB,GAAG,iBAAiB,CA8sFzE"}