triangle-utils 1.4.53 → 1.4.54
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/src/UtilsAnthropic.d.ts +1 -0
- package/dist/src/UtilsAnthropic.js +7 -1
- package/dist/src/f.js +1 -1
- package/package.json +1 -1
- package/src/UtilsAnthropic.ts +9 -2
- package/src/f.ts +1 -1
|
@@ -32,7 +32,13 @@ export class UtilsAnthropic {
|
|
|
32
32
|
role: "user",
|
|
33
33
|
content: message_contents
|
|
34
34
|
}],
|
|
35
|
-
max_tokens: options.max_tokens || 1000
|
|
35
|
+
max_tokens: options.max_tokens || 1000,
|
|
36
|
+
output_config: options.json_format !== undefined ? {
|
|
37
|
+
format: {
|
|
38
|
+
type: "json_schema",
|
|
39
|
+
schema: options.json_format
|
|
40
|
+
}
|
|
41
|
+
} : undefined
|
|
36
42
|
});
|
|
37
43
|
const usage = response.usage;
|
|
38
44
|
if (options.print_usage !== undefined && options.print_usage) {
|
package/dist/src/f.js
CHANGED
|
@@ -17,7 +17,7 @@ console.log(config);
|
|
|
17
17
|
const utils = new TriangleUtils(config);
|
|
18
18
|
// const foods = await utils.dynamodb.query("triage_docket_documents:register_document_id", { register_document_id : "E6-17065" })
|
|
19
19
|
// console.log(foods)
|
|
20
|
-
const text = await utils.
|
|
20
|
+
const text = await utils.bee.get("https://www.doyourjobs.org", { return_page_text: true });
|
|
21
21
|
console.log(text);
|
|
22
22
|
// const text = await utils.bedrock.claude_invoke("global.anthropic.claude-opus-4-6-v1", "hi", undefined, { print_usage : true })
|
|
23
23
|
// console.log(text)
|
package/package.json
CHANGED
package/src/UtilsAnthropic.ts
CHANGED
|
@@ -14,7 +14,8 @@ export class UtilsAnthropic {
|
|
|
14
14
|
attachment_pdf? : string,
|
|
15
15
|
options : {
|
|
16
16
|
max_tokens? : number,
|
|
17
|
-
print_usage? : boolean
|
|
17
|
+
print_usage? : boolean,
|
|
18
|
+
json_format? : Record<string, any>
|
|
18
19
|
} = {}
|
|
19
20
|
) : Promise<string | undefined> {
|
|
20
21
|
try {
|
|
@@ -46,7 +47,13 @@ export class UtilsAnthropic {
|
|
|
46
47
|
role : "user",
|
|
47
48
|
content : message_contents
|
|
48
49
|
}],
|
|
49
|
-
max_tokens : options.max_tokens || 1000
|
|
50
|
+
max_tokens : options.max_tokens || 1000,
|
|
51
|
+
output_config : options.json_format !== undefined ? {
|
|
52
|
+
format : {
|
|
53
|
+
type : "json_schema",
|
|
54
|
+
schema : options.json_format
|
|
55
|
+
}
|
|
56
|
+
} : undefined
|
|
50
57
|
})
|
|
51
58
|
|
|
52
59
|
const usage = response.usage
|
package/src/f.ts
CHANGED
|
@@ -28,7 +28,7 @@ const utils = new TriangleUtils(config)
|
|
|
28
28
|
|
|
29
29
|
// console.log(foods)
|
|
30
30
|
|
|
31
|
-
const text = await utils.
|
|
31
|
+
const text = await utils.bee.get("https://www.doyourjobs.org", { return_page_text : true })
|
|
32
32
|
|
|
33
33
|
console.log(text)
|
|
34
34
|
|