@reverbia/sdk 1.0.0-next.20251208102554 → 1.0.0-next.20251208111334

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/dist/index.d.mts CHANGED
@@ -40,11 +40,11 @@ type LlmapiChatCompletionRequest = {
40
40
  /**
41
41
  * Messages is the conversation history
42
42
  */
43
- messages?: Array<LlmapiMessage>;
43
+ messages: Array<LlmapiMessage>;
44
44
  /**
45
45
  * Model is the model identifier
46
46
  */
47
- model?: string;
47
+ model: string;
48
48
  /**
49
49
  * Stream indicates if response should be streamed
50
50
  */
@@ -149,11 +149,11 @@ type LlmapiEmbeddingRequest = {
149
149
  /**
150
150
  * Input text or tokens to embed (can be string, []string, []int, or [][]int)
151
151
  */
152
- input?: unknown;
152
+ input: unknown;
153
153
  /**
154
154
  * Model identifier in 'provider/model' format
155
155
  */
156
- model?: string;
156
+ model: string;
157
157
  };
158
158
  type LlmapiEmbeddingResponse = {
159
159
  /**
@@ -219,11 +219,11 @@ type LlmapiImageGenerationRequest = {
219
219
  /**
220
220
  * Model is the model identifier to use for generation (e.g., "gpt-image-1").
221
221
  */
222
- model?: string;
222
+ model: string;
223
223
  /**
224
224
  * Prompt is the text description of the desired image.
225
225
  */
226
- prompt?: string;
226
+ prompt: string;
227
227
  /**
228
228
  * Quality targets a quality preset (e.g., "auto", "high").
229
229
  */
@@ -466,7 +466,7 @@ type LlmapiSearchRequest = {
466
466
  /**
467
467
  * Search query. Can be a single string or array of strings.
468
468
  */
469
- query?: Array<string>;
469
+ query: Array<string>;
470
470
  /**
471
471
  * List of domains to filter results (max 20 domains).
472
472
  */
@@ -474,7 +474,7 @@ type LlmapiSearchRequest = {
474
474
  /**
475
475
  * The search provider to use.
476
476
  */
477
- search_tool_name?: string;
477
+ search_tool_name: string;
478
478
  };
479
479
  type LlmapiSearchResponse = {
480
480
  extra_fields?: LlmapiSearchExtraFields;
package/dist/index.d.ts CHANGED
@@ -40,11 +40,11 @@ type LlmapiChatCompletionRequest = {
40
40
  /**
41
41
  * Messages is the conversation history
42
42
  */
43
- messages?: Array<LlmapiMessage>;
43
+ messages: Array<LlmapiMessage>;
44
44
  /**
45
45
  * Model is the model identifier
46
46
  */
47
- model?: string;
47
+ model: string;
48
48
  /**
49
49
  * Stream indicates if response should be streamed
50
50
  */
@@ -149,11 +149,11 @@ type LlmapiEmbeddingRequest = {
149
149
  /**
150
150
  * Input text or tokens to embed (can be string, []string, []int, or [][]int)
151
151
  */
152
- input?: unknown;
152
+ input: unknown;
153
153
  /**
154
154
  * Model identifier in 'provider/model' format
155
155
  */
156
- model?: string;
156
+ model: string;
157
157
  };
158
158
  type LlmapiEmbeddingResponse = {
159
159
  /**
@@ -219,11 +219,11 @@ type LlmapiImageGenerationRequest = {
219
219
  /**
220
220
  * Model is the model identifier to use for generation (e.g., "gpt-image-1").
221
221
  */
222
- model?: string;
222
+ model: string;
223
223
  /**
224
224
  * Prompt is the text description of the desired image.
225
225
  */
226
- prompt?: string;
226
+ prompt: string;
227
227
  /**
228
228
  * Quality targets a quality preset (e.g., "auto", "high").
229
229
  */
@@ -466,7 +466,7 @@ type LlmapiSearchRequest = {
466
466
  /**
467
467
  * Search query. Can be a single string or array of strings.
468
468
  */
469
- query?: Array<string>;
469
+ query: Array<string>;
470
470
  /**
471
471
  * List of domains to filter results (max 20 domains).
472
472
  */
@@ -474,7 +474,7 @@ type LlmapiSearchRequest = {
474
474
  /**
475
475
  * The search provider to use.
476
476
  */
477
- search_tool_name?: string;
477
+ search_tool_name: string;
478
478
  };
479
479
  type LlmapiSearchResponse = {
480
480
  extra_fields?: LlmapiSearchExtraFields;
@@ -49065,7 +49065,7 @@ var generateEmbeddingForText = async (text, options = {}) => {
49065
49065
  baseUrl,
49066
49066
  body: {
49067
49067
  input: text,
49068
- model: model2
49068
+ model: model2 ?? DEFAULT_API_EMBEDDING_MODEL
49069
49069
  },
49070
49070
  headers: {
49071
49071
  Authorization: `Bearer ${token}`
@@ -98,11 +98,11 @@ type LlmapiImageGenerationRequest = {
98
98
  /**
99
99
  * Model is the model identifier to use for generation (e.g., "gpt-image-1").
100
100
  */
101
- model?: string;
101
+ model: string;
102
102
  /**
103
103
  * Prompt is the text description of the desired image.
104
104
  */
105
- prompt?: string;
105
+ prompt: string;
106
106
  /**
107
107
  * Quality targets a quality preset (e.g., "auto", "high").
108
108
  */
@@ -301,32 +301,6 @@ type LlmapiSearchExtraFields = {
301
301
  */
302
302
  search_provider?: string;
303
303
  };
304
- type LlmapiSearchRequest = {
305
- /**
306
- * Country code filter (e.g., "US", "GB", "DE").
307
- */
308
- country?: string;
309
- /**
310
- * Maximum number of results to return (1-20). Default: 10.
311
- */
312
- max_results?: number;
313
- /**
314
- * Maximum tokens per page to process. Default: 1024.
315
- */
316
- max_tokens_per_page?: number;
317
- /**
318
- * Search query. Can be a single string or array of strings.
319
- */
320
- query?: Array<string>;
321
- /**
322
- * List of domains to filter results (max 20 domains).
323
- */
324
- search_domain_filter?: Array<string>;
325
- /**
326
- * The search provider to use.
327
- */
328
- search_tool_name?: string;
329
- };
330
304
  type LlmapiSearchResponse = {
331
305
  extra_fields?: LlmapiSearchExtraFields;
332
306
  /**
@@ -777,7 +751,28 @@ type UseSearchOptions = {
777
751
  */
778
752
  onError?: (error: Error) => void;
779
753
  };
780
- type SearchOptions = Omit<LlmapiSearchRequest, "query">;
754
+ type SearchOptions = {
755
+ /**
756
+ * Country code for search results (e.g., "us", "gb")
757
+ */
758
+ country?: string;
759
+ /**
760
+ * Maximum number of results to return
761
+ */
762
+ max_results?: number;
763
+ /**
764
+ * Maximum tokens per page
765
+ */
766
+ max_tokens_per_page?: number;
767
+ /**
768
+ * List of domains to filter results (max 20 domains)
769
+ */
770
+ search_domain_filter?: string[];
771
+ /**
772
+ * The search provider to use
773
+ */
774
+ search_tool_name?: string;
775
+ };
781
776
  type UseSearchResult = {
782
777
  isLoading: boolean;
783
778
  search: (query: string | string[], options?: SearchOptions) => Promise<LlmapiSearchResponse | null>;
@@ -98,11 +98,11 @@ type LlmapiImageGenerationRequest = {
98
98
  /**
99
99
  * Model is the model identifier to use for generation (e.g., "gpt-image-1").
100
100
  */
101
- model?: string;
101
+ model: string;
102
102
  /**
103
103
  * Prompt is the text description of the desired image.
104
104
  */
105
- prompt?: string;
105
+ prompt: string;
106
106
  /**
107
107
  * Quality targets a quality preset (e.g., "auto", "high").
108
108
  */
@@ -301,32 +301,6 @@ type LlmapiSearchExtraFields = {
301
301
  */
302
302
  search_provider?: string;
303
303
  };
304
- type LlmapiSearchRequest = {
305
- /**
306
- * Country code filter (e.g., "US", "GB", "DE").
307
- */
308
- country?: string;
309
- /**
310
- * Maximum number of results to return (1-20). Default: 10.
311
- */
312
- max_results?: number;
313
- /**
314
- * Maximum tokens per page to process. Default: 1024.
315
- */
316
- max_tokens_per_page?: number;
317
- /**
318
- * Search query. Can be a single string or array of strings.
319
- */
320
- query?: Array<string>;
321
- /**
322
- * List of domains to filter results (max 20 domains).
323
- */
324
- search_domain_filter?: Array<string>;
325
- /**
326
- * The search provider to use.
327
- */
328
- search_tool_name?: string;
329
- };
330
304
  type LlmapiSearchResponse = {
331
305
  extra_fields?: LlmapiSearchExtraFields;
332
306
  /**
@@ -777,7 +751,28 @@ type UseSearchOptions = {
777
751
  */
778
752
  onError?: (error: Error) => void;
779
753
  };
780
- type SearchOptions = Omit<LlmapiSearchRequest, "query">;
754
+ type SearchOptions = {
755
+ /**
756
+ * Country code for search results (e.g., "us", "gb")
757
+ */
758
+ country?: string;
759
+ /**
760
+ * Maximum number of results to return
761
+ */
762
+ max_results?: number;
763
+ /**
764
+ * Maximum tokens per page
765
+ */
766
+ max_tokens_per_page?: number;
767
+ /**
768
+ * List of domains to filter results (max 20 domains)
769
+ */
770
+ search_domain_filter?: string[];
771
+ /**
772
+ * The search provider to use
773
+ */
774
+ search_tool_name?: string;
775
+ };
781
776
  type UseSearchResult = {
782
777
  isLoading: boolean;
783
778
  search: (query: string | string[], options?: SearchOptions) => Promise<LlmapiSearchResponse | null>;
@@ -1665,7 +1665,7 @@ var generateEmbeddingForText = async (text, options = {}) => {
1665
1665
  baseUrl,
1666
1666
  body: {
1667
1667
  input: text,
1668
- model: model2
1668
+ model: model2 ?? DEFAULT_API_EMBEDDING_MODEL
1669
1669
  },
1670
1670
  headers: {
1671
1671
  Authorization: `Bearer ${token}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reverbia/sdk",
3
- "version": "1.0.0-next.20251208102554",
3
+ "version": "1.0.0-next.20251208111334",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -72,7 +72,7 @@
72
72
  "homepage": "https://github.com/zeta-chain/ai-sdk#readme",
73
73
  "dependencies": {
74
74
  "@huggingface/transformers": "^3.8.0",
75
- "@reverbia/portal": "1.0.0-next.20251202220311",
75
+ "@reverbia/portal": "1.0.0-next.20251208093751",
76
76
  "ai": "5.0.93",
77
77
  "pdfjs-dist": "^4.10.38",
78
78
  "tesseract.js": "^6.0.1"