promptlayer 1.0.2 → 1.0.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.
package/dist/index.d.mts CHANGED
@@ -31,7 +31,7 @@ interface GetPromptTemplateParams {
31
31
  version?: number;
32
32
  label?: string;
33
33
  provider?: string;
34
- input_variables?: Record<string, string>;
34
+ input_variables?: Record<string, unknown>;
35
35
  metadata_filters?: Record<string, string>;
36
36
  }
37
37
  declare const templateFormat: readonly ["f-string", "jinja2"];
@@ -104,7 +104,11 @@ type ToolMessage = {
104
104
  tool_call_id: string;
105
105
  name?: string;
106
106
  };
107
- type Message = SystemMessage | UserMessage | AssistantMessage | FunctionMessage | ToolMessage;
107
+ type PlaceholderMessage = {
108
+ role: "placeholder";
109
+ name: string;
110
+ };
111
+ type Message = SystemMessage | UserMessage | AssistantMessage | FunctionMessage | ToolMessage | PlaceholderMessage;
108
112
  type ChatFunctionCall = {
109
113
  name: string;
110
114
  };
@@ -181,7 +185,7 @@ interface RunRequest {
181
185
  stream?: boolean;
182
186
  promptVersion?: number;
183
187
  promptReleaseLabel?: string;
184
- inputVariables?: Record<string, string>;
188
+ inputVariables?: Record<string, unknown>;
185
189
  }
186
190
 
187
191
  declare class TemplateManager {
package/dist/index.d.ts CHANGED
@@ -31,7 +31,7 @@ interface GetPromptTemplateParams {
31
31
  version?: number;
32
32
  label?: string;
33
33
  provider?: string;
34
- input_variables?: Record<string, string>;
34
+ input_variables?: Record<string, unknown>;
35
35
  metadata_filters?: Record<string, string>;
36
36
  }
37
37
  declare const templateFormat: readonly ["f-string", "jinja2"];
@@ -104,7 +104,11 @@ type ToolMessage = {
104
104
  tool_call_id: string;
105
105
  name?: string;
106
106
  };
107
- type Message = SystemMessage | UserMessage | AssistantMessage | FunctionMessage | ToolMessage;
107
+ type PlaceholderMessage = {
108
+ role: "placeholder";
109
+ name: string;
110
+ };
111
+ type Message = SystemMessage | UserMessage | AssistantMessage | FunctionMessage | ToolMessage | PlaceholderMessage;
108
112
  type ChatFunctionCall = {
109
113
  name: string;
110
114
  };
@@ -181,7 +185,7 @@ interface RunRequest {
181
185
  stream?: boolean;
182
186
  promptVersion?: number;
183
187
  promptReleaseLabel?: string;
184
- inputVariables?: Record<string, string>;
188
+ inputVariables?: Record<string, unknown>;
185
189
  }
186
190
 
187
191
  declare class TemplateManager {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "promptlayer",
3
3
  "license": "MIT",
4
- "version": "1.0.2",
4
+ "version": "1.0.4",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "types": "dist/index.d.ts",
package/src/types.ts CHANGED
@@ -30,7 +30,7 @@ export interface TrackRequest {
30
30
  metadata?: Record<string, string>;
31
31
  tags?: string[];
32
32
  request_response?: Record<string, unknown>;
33
- prompt_input_variables?: Record<string, string> | string[];
33
+ prompt_input_variables?: Record<string, unknown> | string[];
34
34
  return_data?: boolean;
35
35
  group_id?: number;
36
36
  [k: string]: unknown;
@@ -68,7 +68,7 @@ export interface GetPromptTemplateParams {
68
68
  version?: number;
69
69
  label?: string;
70
70
  provider?: string;
71
- input_variables?: Record<string, string>;
71
+ input_variables?: Record<string, unknown>;
72
72
  metadata_filters?: Record<string, string>;
73
73
  }
74
74
 
@@ -157,12 +157,18 @@ export type ToolMessage = {
157
157
  name?: string;
158
158
  };
159
159
 
160
+ export type PlaceholderMessage = {
161
+ role: "placeholder";
162
+ name: string;
163
+ };
164
+
160
165
  export type Message =
161
166
  | SystemMessage
162
167
  | UserMessage
163
168
  | AssistantMessage
164
169
  | FunctionMessage
165
- | ToolMessage;
170
+ | ToolMessage
171
+ | PlaceholderMessage;
166
172
 
167
173
  export type ChatFunctionCall = {
168
174
  name: string;
@@ -256,5 +262,5 @@ export interface RunRequest {
256
262
  stream?: boolean;
257
263
  promptVersion?: number;
258
264
  promptReleaseLabel?: string;
259
- inputVariables?: Record<string, string>;
265
+ inputVariables?: Record<string, unknown>;
260
266
  }