@jaypie/llm 1.1.23 → 1.1.25
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/Llm.d.ts +4 -4
- package/dist/constants.d.ts +22 -15
- package/dist/index.d.ts +3 -2
- package/dist/index.js +177 -21
- package/dist/index.js.map +1 -1
- package/dist/providers/openai/types.d.ts +9 -1
- package/dist/tools/index.d.ts +10 -2
- package/dist/types/LlmProvider.interface.d.ts +6 -6
- package/dist/util/determineModelProvider.d.ts +4 -0
- package/dist/util/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -33,10 +33,18 @@ export interface OpenAIFunctionCallOutput {
|
|
|
33
33
|
call_id: string;
|
|
34
34
|
output: string;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Represents a reasoning item in the OpenAI response (GPT-5)
|
|
38
|
+
*/
|
|
39
|
+
export interface OpenAIReasoningItem {
|
|
40
|
+
type: "reasoning";
|
|
41
|
+
id: string;
|
|
42
|
+
content?: string;
|
|
43
|
+
}
|
|
36
44
|
/**
|
|
37
45
|
* Union type for all possible response items
|
|
38
46
|
*/
|
|
39
|
-
export type OpenAIResponseItem = OpenAIFunctionCall | OpenAIMessage | OpenAIFunctionCallOutput;
|
|
47
|
+
export type OpenAIResponseItem = OpenAIFunctionCall | OpenAIMessage | OpenAIFunctionCallOutput | OpenAIReasoningItem;
|
|
40
48
|
/**
|
|
41
49
|
* Represents token usage information in the OpenAI response
|
|
42
50
|
*/
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { Toolkit } from "./Toolkit.class.js";
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
2
|
+
import type { LlmTool } from "../types/LlmTool.interface.js";
|
|
3
|
+
export declare const tools: LlmTool[];
|
|
4
|
+
export declare class JaypieToolkit extends Toolkit {
|
|
5
|
+
readonly random: LlmTool;
|
|
6
|
+
readonly roll: LlmTool;
|
|
7
|
+
readonly time: LlmTool;
|
|
8
|
+
readonly weather: LlmTool;
|
|
9
|
+
constructor(tools: LlmTool[], options?: any);
|
|
10
|
+
}
|
|
11
|
+
export declare const toolkit: JaypieToolkit;
|
|
4
12
|
export { Toolkit };
|
|
@@ -29,23 +29,23 @@ interface LlmError {
|
|
|
29
29
|
status: number | string;
|
|
30
30
|
title: string;
|
|
31
31
|
}
|
|
32
|
-
interface LlmInputContentFile {
|
|
32
|
+
export interface LlmInputContentFile {
|
|
33
33
|
type: LlmMessageType.InputFile;
|
|
34
34
|
file_data: File;
|
|
35
35
|
file_id?: string;
|
|
36
36
|
filename?: string;
|
|
37
37
|
}
|
|
38
|
-
interface LlmInputContentImage {
|
|
38
|
+
export interface LlmInputContentImage {
|
|
39
39
|
type: LlmMessageType.InputImage;
|
|
40
|
-
detail
|
|
40
|
+
detail?: File;
|
|
41
41
|
file_id?: string;
|
|
42
42
|
image_url?: string;
|
|
43
43
|
}
|
|
44
|
-
interface LlmInputContentText {
|
|
44
|
+
export interface LlmInputContentText {
|
|
45
45
|
type: LlmMessageType.InputText;
|
|
46
46
|
text: string;
|
|
47
47
|
}
|
|
48
|
-
type LlmInputContent = LlmInputContentFile | LlmInputContentImage | LlmInputContentText;
|
|
48
|
+
export type LlmInputContent = LlmInputContentFile | LlmInputContentImage | LlmInputContentText;
|
|
49
49
|
/**
|
|
50
50
|
* Represents the "Input message object" in the "input item list"
|
|
51
51
|
* from [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses/create)
|
|
@@ -53,7 +53,7 @@ type LlmInputContent = LlmInputContentFile | LlmInputContentImage | LlmInputCont
|
|
|
53
53
|
export interface LlmInputMessage {
|
|
54
54
|
content: string | Array<LlmInputContent>;
|
|
55
55
|
role: LlmMessageRole;
|
|
56
|
-
type
|
|
56
|
+
type?: LlmMessageType.Message;
|
|
57
57
|
}
|
|
58
58
|
export interface LlmOutputContentText {
|
|
59
59
|
annotations?: AnyValue[];
|
package/dist/util/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaypie/llm",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.25",
|
|
4
4
|
"description": "Large language model utilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Finlayson Studio",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "95adbd9cd9981285b204c8a9b243a72b845eb995"
|
|
45
45
|
}
|