@wrcb/cb-common 1.0.842 → 1.0.843

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.
@@ -17,6 +17,7 @@ export interface AIRequestMadeEvent {
17
17
  prompt: string;
18
18
  inputChars?: number;
19
19
  imageSize?: string;
20
+ account?: string;
20
21
  success: boolean;
21
22
  errorMessage?: string;
22
23
  };
@@ -10,6 +10,7 @@ export interface ChatParams {
10
10
  responseFormat?: {
11
11
  type: 'json_object' | 'text';
12
12
  };
13
+ account?: string;
13
14
  }
14
15
  export interface TTSParams {
15
16
  model: string;
@@ -18,10 +19,12 @@ export interface TTSParams {
18
19
  speed?: number;
19
20
  instructions?: string;
20
21
  responseFormat?: string;
22
+ account?: string;
21
23
  }
22
24
  export interface TranscribeParams {
23
25
  audioBuffer: Buffer;
24
26
  mimeType?: string;
27
+ account?: string;
25
28
  }
26
29
  export interface ImageGenerateParams {
27
30
  model: string;
@@ -29,6 +32,7 @@ export interface ImageGenerateParams {
29
32
  size: string;
30
33
  quality?: string;
31
34
  n?: number;
35
+ account?: string;
32
36
  }
33
37
  export interface ImageEditParams {
34
38
  model: string;
@@ -36,6 +40,7 @@ export interface ImageEditParams {
36
40
  prompt: string;
37
41
  size: string;
38
42
  n?: number;
43
+ account?: string;
39
44
  }
40
45
  export interface ChatResult {
41
46
  content: string;
@@ -87,6 +87,7 @@ class AIClient {
87
87
  prompt: data.prompt,
88
88
  inputChars: data.inputChars,
89
89
  imageSize: data.imageSize,
90
+ account: data.account,
90
91
  success: data.success,
91
92
  errorMessage: data.errorMessage,
92
93
  });
@@ -99,7 +100,7 @@ class AIClient {
99
100
  chat(params) {
100
101
  return __awaiter(this, void 0, void 0, function* () {
101
102
  var _a, _b, _c, _d, _e, _f, _g;
102
- const { provider, model, messages, maxTokens, temperature, responseFormat } = params;
103
+ const { provider, model, messages, maxTokens, temperature, responseFormat, account } = params;
103
104
  const client = provider === 'cerebras' ? this.cerebras : this.openai;
104
105
  const requestedAt = new Date().toISOString();
105
106
  const t0 = Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.842",
3
+ "version": "1.0.843",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",