nuabase 2.3.2 → 2.3.4

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.
@@ -1,9 +1,10 @@
1
+ import type { ModelInput } from 'nua-llm-core';
1
2
  export type CastValueParams = {
2
3
  prompt: string;
3
4
  data: unknown;
4
5
  outputName: string;
5
6
  outputSchema: object;
6
- model?: string;
7
+ model?: ModelInput;
7
8
  };
8
9
  export type CastArrayParams = {
9
10
  prompt: string;
@@ -11,7 +12,7 @@ export type CastArrayParams = {
11
12
  primaryKey: string;
12
13
  outputName: string;
13
14
  outputSchema: object;
14
- model?: string;
15
+ model?: ModelInput;
15
16
  };
16
17
  export type NormalizedUsage = {
17
18
  promptTokens: number;
@@ -1,6 +1,7 @@
1
1
  import { DirectConfig } from './backend/direct';
2
2
  import { GatewayConfig } from './backend/gateway';
3
3
  import { CastResult, QueueResult } from './backend/types';
4
+ import type { ModelInput } from 'nua-llm-core';
4
5
  import { z } from 'zod';
5
6
  export type OutputDef<TSchema extends z.ZodTypeAny> = {
6
7
  name: string;
@@ -9,13 +10,13 @@ export type OutputDef<TSchema extends z.ZodTypeAny> = {
9
10
  export type GetOptions<TSchema extends z.ZodTypeAny> = {
10
11
  input?: unknown;
11
12
  output: OutputDef<TSchema>;
12
- model?: string;
13
+ model?: ModelInput;
13
14
  };
14
15
  export type ListOptions<TSchema extends z.ZodTypeAny, TData extends Record<string, unknown>, PrimaryKey extends keyof TData & string> = {
15
16
  input: TData[];
16
17
  primaryKey: PrimaryKey;
17
18
  output: OutputDef<TSchema>;
18
- model?: string;
19
+ model?: ModelInput;
19
20
  };
20
21
  export type ListResultRow<TSchema extends z.ZodTypeAny, PrimaryKey extends string> = {
21
22
  [K in PrimaryKey]: string | number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuabase",
3
3
  "description": "Nuabase TypeScript client to create typed functions from LLM prompts",
4
- "version": "2.3.2",
4
+ "version": "2.3.4",
5
5
  "type": "module",
6
6
  "author": "Jasim A Basheer <jasim@nuabase.com>",
7
7
  "engines": {