tracia 0.3.8 → 0.3.9
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 +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -27,6 +27,12 @@ interface RunResult {
|
|
|
27
27
|
latencyMs: number;
|
|
28
28
|
usage: TokenUsage;
|
|
29
29
|
cost: number;
|
|
30
|
+
/** Reason the model stopped generating */
|
|
31
|
+
finishReason?: FinishReason;
|
|
32
|
+
/** Tool calls made by the model */
|
|
33
|
+
toolCalls?: ToolCall[];
|
|
34
|
+
/** Parsed JSON when the prompt has an output schema configured */
|
|
35
|
+
structuredOutput?: Record<string, unknown>;
|
|
30
36
|
}
|
|
31
37
|
declare enum TraciaErrorCode {
|
|
32
38
|
UNAUTHORIZED = "UNAUTHORIZED",
|
|
@@ -57,6 +63,9 @@ interface ApiSuccessResponse {
|
|
|
57
63
|
latencyMs: number;
|
|
58
64
|
usage: TokenUsage;
|
|
59
65
|
cost: number;
|
|
66
|
+
finishReason?: FinishReason;
|
|
67
|
+
toolCalls?: ToolCall[];
|
|
68
|
+
structuredOutput?: Record<string, unknown>;
|
|
60
69
|
}
|
|
61
70
|
type MessageRole = 'system' | 'developer' | 'user' | 'assistant' | 'tool';
|
|
62
71
|
interface PromptMessage {
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,12 @@ interface RunResult {
|
|
|
27
27
|
latencyMs: number;
|
|
28
28
|
usage: TokenUsage;
|
|
29
29
|
cost: number;
|
|
30
|
+
/** Reason the model stopped generating */
|
|
31
|
+
finishReason?: FinishReason;
|
|
32
|
+
/** Tool calls made by the model */
|
|
33
|
+
toolCalls?: ToolCall[];
|
|
34
|
+
/** Parsed JSON when the prompt has an output schema configured */
|
|
35
|
+
structuredOutput?: Record<string, unknown>;
|
|
30
36
|
}
|
|
31
37
|
declare enum TraciaErrorCode {
|
|
32
38
|
UNAUTHORIZED = "UNAUTHORIZED",
|
|
@@ -57,6 +63,9 @@ interface ApiSuccessResponse {
|
|
|
57
63
|
latencyMs: number;
|
|
58
64
|
usage: TokenUsage;
|
|
59
65
|
cost: number;
|
|
66
|
+
finishReason?: FinishReason;
|
|
67
|
+
toolCalls?: ToolCall[];
|
|
68
|
+
structuredOutput?: Record<string, unknown>;
|
|
60
69
|
}
|
|
61
70
|
type MessageRole = 'system' | 'developer' | 'user' | 'assistant' | 'tool';
|
|
62
71
|
interface PromptMessage {
|
package/dist/index.js
CHANGED
|
@@ -76,7 +76,7 @@ var LLMProvider = /* @__PURE__ */ ((LLMProvider2) => {
|
|
|
76
76
|
})(LLMProvider || {});
|
|
77
77
|
|
|
78
78
|
// src/client.ts
|
|
79
|
-
var SDK_VERSION = "0.3.
|
|
79
|
+
var SDK_VERSION = "0.3.9";
|
|
80
80
|
var DEFAULT_TIMEOUT_MS = 12e4;
|
|
81
81
|
function mapApiErrorCodeToTraciaErrorCode(apiCode) {
|
|
82
82
|
const codeMap = {
|
|
@@ -221,7 +221,10 @@ var Prompts = class {
|
|
|
221
221
|
promptVersion: response.promptVersion,
|
|
222
222
|
latencyMs: response.latencyMs,
|
|
223
223
|
usage: response.usage,
|
|
224
|
-
cost: response.cost
|
|
224
|
+
cost: response.cost,
|
|
225
|
+
finishReason: response.finishReason,
|
|
226
|
+
toolCalls: response.toolCalls,
|
|
227
|
+
structuredOutput: response.structuredOutput
|
|
225
228
|
};
|
|
226
229
|
}
|
|
227
230
|
};
|