@elizaos/plugin-openai 1.6.0 → 2.0.0-alpha.2
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/LICENSE +1 -1
- package/dist/browser/index.browser.js +2 -2
- package/dist/browser/index.browser.js.map +18 -17
- package/dist/build.d.ts +13 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/cjs/index.node.cjs +998 -658
- package/dist/cjs/index.node.js.map +18 -17
- package/dist/generated/specs/specs.d.ts +55 -0
- package/dist/generated/specs/specs.d.ts.map +1 -0
- package/dist/index.browser.d.ts +1 -0
- package/dist/index.browser.d.ts.map +1 -0
- package/dist/index.d.ts +1 -5
- package/dist/index.d.ts.map +1 -0
- package/dist/index.node.d.ts +1 -0
- package/dist/index.node.d.ts.map +1 -0
- package/dist/init.d.ts +4 -5
- package/dist/init.d.ts.map +1 -0
- package/dist/models/audio.d.ts +9 -10
- package/dist/models/audio.d.ts.map +1 -0
- package/dist/models/embedding.d.ts +1 -3
- package/dist/models/embedding.d.ts.map +1 -0
- package/dist/models/image.d.ts +4 -13
- package/dist/models/image.d.ts.map +1 -0
- package/dist/models/index.d.ts +7 -5
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/object.d.ts +4 -9
- package/dist/models/object.d.ts.map +1 -0
- package/dist/models/research.d.ts +34 -0
- package/dist/models/research.d.ts.map +1 -0
- package/dist/models/text.d.ts +22 -3
- package/dist/models/text.d.ts.map +1 -0
- package/dist/models/tokenizer.d.ts +4 -9
- package/dist/models/tokenizer.d.ts.map +1 -0
- package/dist/node/index.node.js +987 -644
- package/dist/node/index.node.js.map +18 -17
- package/dist/providers/index.d.ts +2 -1
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/openai.d.ts +3 -7
- package/dist/providers/openai.d.ts.map +1 -0
- package/dist/types/index.d.ts +313 -10
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/audio.d.ts +6 -12
- package/dist/utils/audio.d.ts.map +1 -0
- package/dist/utils/config.d.ts +16 -59
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/events.d.ts +14 -9
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/json.d.ts +9 -6
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/tokenization.d.ts +5 -16
- package/dist/utils/tokenization.d.ts.map +1 -0
- package/package.json +24 -28
- package/README.md +0 -160
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated canonical action/provider/evaluator docs for plugin-openai.
|
|
3
|
+
* DO NOT EDIT - Generated from prompts/specs/**.
|
|
4
|
+
*/
|
|
5
|
+
export type ActionDoc = {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
similes?: readonly string[];
|
|
9
|
+
parameters?: readonly unknown[];
|
|
10
|
+
examples?: readonly (readonly unknown[])[];
|
|
11
|
+
};
|
|
12
|
+
export type ProviderDoc = {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
position?: number;
|
|
16
|
+
dynamic?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type EvaluatorDoc = {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
similes?: readonly string[];
|
|
22
|
+
alwaysRun?: boolean;
|
|
23
|
+
examples?: readonly unknown[];
|
|
24
|
+
};
|
|
25
|
+
export declare const coreActionsSpec: {
|
|
26
|
+
readonly version: "1.0.0";
|
|
27
|
+
readonly actions: readonly [];
|
|
28
|
+
};
|
|
29
|
+
export declare const allActionsSpec: {
|
|
30
|
+
readonly version: "1.0.0";
|
|
31
|
+
readonly actions: readonly [];
|
|
32
|
+
};
|
|
33
|
+
export declare const coreProvidersSpec: {
|
|
34
|
+
readonly version: "1.0.0";
|
|
35
|
+
readonly providers: readonly [];
|
|
36
|
+
};
|
|
37
|
+
export declare const allProvidersSpec: {
|
|
38
|
+
readonly version: "1.0.0";
|
|
39
|
+
readonly providers: readonly [];
|
|
40
|
+
};
|
|
41
|
+
export declare const coreEvaluatorsSpec: {
|
|
42
|
+
readonly version: "1.0.0";
|
|
43
|
+
readonly evaluators: readonly [];
|
|
44
|
+
};
|
|
45
|
+
export declare const allEvaluatorsSpec: {
|
|
46
|
+
readonly version: "1.0.0";
|
|
47
|
+
readonly evaluators: readonly [];
|
|
48
|
+
};
|
|
49
|
+
export declare const coreActionDocs: readonly ActionDoc[];
|
|
50
|
+
export declare const allActionDocs: readonly ActionDoc[];
|
|
51
|
+
export declare const coreProviderDocs: readonly ProviderDoc[];
|
|
52
|
+
export declare const allProviderDocs: readonly ProviderDoc[];
|
|
53
|
+
export declare const coreEvaluatorDocs: readonly EvaluatorDoc[];
|
|
54
|
+
export declare const allEvaluatorDocs: readonly EvaluatorDoc[];
|
|
55
|
+
//# sourceMappingURL=specs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../../generated/specs/specs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,OAAO,EAAE,CAAC,EAAE,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AACX,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AACX,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AACX,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AACX,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AACX,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AAEX,eAAO,MAAM,cAAc,EAAE,SAAS,SAAS,EAA4B,CAAC;AAC5E,eAAO,MAAM,aAAa,EAAE,SAAS,SAAS,EAA2B,CAAC;AAC1E,eAAO,MAAM,gBAAgB,EAAE,SAAS,WAAW,EAAgC,CAAC;AACpF,eAAO,MAAM,eAAe,EAAE,SAAS,WAAW,EAA+B,CAAC;AAClF,eAAO,MAAM,iBAAiB,EAAE,SAAS,YAAY,EAAkC,CAAC;AACxF,eAAO,MAAM,gBAAgB,EAAE,SAAS,YAAY,EAAiC,CAAC"}
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../index.browser.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { Plugin } from "@elizaos/core";
|
|
2
|
-
export * from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* Defines the OpenAI plugin with its name, description, and configuration options.
|
|
5
|
-
* @type {Plugin}
|
|
6
|
-
*/
|
|
7
2
|
export declare const openaiPlugin: Plugin;
|
|
8
3
|
export default openaiPlugin;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAUV,MAAM,EAKP,MAAM,eAAe,CAAC;AA+BvB,eAAO,MAAM,YAAY,EAAE,MAsU1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/dist/index.node.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../index.node.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/init.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare function initializeOpenAI(_config: any, runtime: IAgentRuntime): void;
|
|
1
|
+
import type { IAgentRuntime } from "@elizaos/core";
|
|
2
|
+
import type { OpenAIPluginConfig } from "./types";
|
|
3
|
+
export declare function initializeOpenAI(_config: OpenAIPluginConfig | undefined, runtime: IAgentRuntime): void;
|
|
4
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAKlD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,kBAAkB,GAAG,SAAS,EACvC,OAAO,EAAE,aAAa,GACrB,IAAI,CAEN"}
|
package/dist/models/audio.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { IAgentRuntime } from "@elizaos/core";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare function handleTranscription(runtime: IAgentRuntime, input:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare function handleTextToSpeech(runtime: IAgentRuntime, input: string | OpenAITextToSpeechParams): Promise<ArrayBuffer>;
|
|
1
|
+
import type { TextToSpeechParams as CoreTextToSpeechParams, TranscriptionParams as CoreTranscriptionParams, IAgentRuntime } from "@elizaos/core";
|
|
2
|
+
import type { TextToSpeechParams as LocalTextToSpeechParams, TranscriptionParams as LocalTranscriptionParams } from "../types";
|
|
3
|
+
type AudioInput = Blob | File | Buffer;
|
|
4
|
+
type TranscriptionInput = AudioInput | LocalTranscriptionParams | CoreTranscriptionParams | string;
|
|
5
|
+
type TTSInput = string | LocalTextToSpeechParams | CoreTextToSpeechParams;
|
|
6
|
+
export declare function handleTranscription(runtime: IAgentRuntime, input: TranscriptionInput): Promise<string>;
|
|
7
|
+
export declare function handleTextToSpeech(runtime: IAgentRuntime, input: TTSInput): Promise<ArrayBuffer>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=audio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../models/audio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,IAAI,sBAAsB,EAC5C,mBAAmB,IAAI,uBAAuB,EAC9C,aAAa,EACd,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EACV,kBAAkB,IAAI,uBAAuB,EAC7C,mBAAmB,IAAI,wBAAwB,EAIhD,MAAM,UAAU,CAAC;AAWlB,KAAK,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AACvC,KAAK,kBAAkB,GAAG,UAAU,GAAG,wBAAwB,GAAG,uBAAuB,GAAG,MAAM,CAAC;AACnG,KAAK,QAAQ,GAAG,MAAM,GAAG,uBAAuB,GAAG,sBAAsB,CAAC;AAoC1E,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,MAAM,CAAC,CAqFjB;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,QAAQ,GACd,OAAO,CAAC,WAAW,CAAC,CAwEtB"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import type { IAgentRuntime, TextEmbeddingParams } from "@elizaos/core";
|
|
2
|
-
/**
|
|
3
|
-
* TEXT_EMBEDDING model handler
|
|
4
|
-
*/
|
|
5
2
|
export declare function handleTextEmbedding(runtime: IAgentRuntime, params: TextEmbeddingParams | string | null): Promise<number[]>;
|
|
3
|
+
//# sourceMappingURL=embedding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../../models/embedding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAoCxE,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,mBAAmB,GAAG,MAAM,GAAG,IAAI,GAC1C,OAAO,CAAC,MAAM,EAAE,CAAC,CAmEnB"}
|
package/dist/models/image.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import type { IAgentRuntime, ImageDescriptionParams, ImageGenerationParams } from "@elizaos/core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
url: string;
|
|
7
|
-
}[]>;
|
|
8
|
-
/**
|
|
9
|
-
* IMAGE_DESCRIPTION model handler
|
|
10
|
-
*/
|
|
11
|
-
export declare function handleImageDescription(runtime: IAgentRuntime, params: ImageDescriptionParams | string): Promise<{
|
|
12
|
-
title: string;
|
|
13
|
-
description: string;
|
|
14
|
-
}>;
|
|
2
|
+
import type { ImageDescriptionResult, ImageGenerationResult } from "../types";
|
|
3
|
+
export declare function handleImageGeneration(runtime: IAgentRuntime, params: ImageGenerationParams): Promise<ImageGenerationResult[]>;
|
|
4
|
+
export declare function handleImageDescription(runtime: IAgentRuntime, params: ImageDescriptionParams | string): Promise<ImageDescriptionResult>;
|
|
5
|
+
//# sourceMappingURL=image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../models/image.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAElG,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EAMtB,MAAM,UAAU,CAAC;AAkBlB,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,EAAE,CAAC,CA0DlC;AAWD,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,sBAAsB,GAAG,MAAM,GACtC,OAAO,CAAC,sBAAsB,CAAC,CA+EjC"}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { handleTextToSpeech, handleTranscription } from "./audio";
|
|
2
2
|
export { handleTextEmbedding } from "./embedding";
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
3
|
+
export { handleImageDescription, handleImageGeneration } from "./image";
|
|
4
|
+
export { handleObjectLarge, handleObjectSmall } from "./object";
|
|
5
|
+
export { handleResearch } from "./research";
|
|
6
|
+
export { handleTextLarge, handleTextSmall } from "./text";
|
|
7
|
+
export { handleTokenizerDecode, handleTokenizerEncode } from "./tokenizer";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/models/object.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import type { IAgentRuntime, ObjectGenerationParams } from "@elizaos/core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare function handleObjectSmall(runtime: IAgentRuntime, params: ObjectGenerationParams): Promise<Record<string, unknown>>;
|
|
6
|
-
/**
|
|
7
|
-
* OBJECT_LARGE model handler
|
|
8
|
-
*/
|
|
9
|
-
export declare function handleObjectLarge(runtime: IAgentRuntime, params: ObjectGenerationParams): Promise<Record<string, unknown>>;
|
|
1
|
+
import type { IAgentRuntime, JsonValue, ObjectGenerationParams } from "@elizaos/core";
|
|
2
|
+
export declare function handleObjectSmall(runtime: IAgentRuntime, params: ObjectGenerationParams): Promise<Record<string, JsonValue>>;
|
|
3
|
+
export declare function handleObjectLarge(runtime: IAgentRuntime, params: ObjectGenerationParams): Promise<Record<string, JsonValue>>;
|
|
4
|
+
//# sourceMappingURL=object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../models/object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EAET,sBAAsB,EACvB,MAAM,eAAe,CAAC;AAoDvB,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAEpC;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAEpC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep Research model handler
|
|
3
|
+
*
|
|
4
|
+
* Provides deep research capabilities using OpenAI's o3-deep-research and o4-mini-deep-research models.
|
|
5
|
+
* These models can find, analyze, and synthesize hundreds of sources to create comprehensive reports.
|
|
6
|
+
*
|
|
7
|
+
* @see https://platform.openai.com/docs/guides/deep-research
|
|
8
|
+
*/
|
|
9
|
+
import type { IAgentRuntime, ResearchParams, ResearchResult } from "@elizaos/core";
|
|
10
|
+
/**
|
|
11
|
+
* Handles RESEARCH model requests using OpenAI's deep research models.
|
|
12
|
+
*
|
|
13
|
+
* Deep research models can take tens of minutes to complete tasks.
|
|
14
|
+
* Use background mode for long-running tasks.
|
|
15
|
+
*
|
|
16
|
+
* @param runtime - The agent runtime
|
|
17
|
+
* @param params - Research parameters
|
|
18
|
+
* @returns Research result with text, annotations, and output items
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const result = await handleResearch(runtime, {
|
|
23
|
+
* input: "Research the economic impact of AI on global labor markets",
|
|
24
|
+
* tools: [
|
|
25
|
+
* { type: "web_search_preview" },
|
|
26
|
+
* { type: "code_interpreter", container: { type: "auto" } }
|
|
27
|
+
* ],
|
|
28
|
+
* background: true,
|
|
29
|
+
* });
|
|
30
|
+
* console.log(result.text);
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function handleResearch(runtime: IAgentRuntime, params: ResearchParams): Promise<ResearchResult>;
|
|
34
|
+
//# sourceMappingURL=research.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research.d.ts","sourceRoot":"","sources":["../../models/research.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,aAAa,EAQb,cAAc,EACd,cAAc,EAGf,MAAM,eAAe,CAAC;AAgPvB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,cAAc,CAAC,CA2GzB"}
|
package/dist/models/text.d.ts
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
import type { GenerateTextParams, IAgentRuntime, TextStreamResult } from "@elizaos/core";
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
2
|
+
* Text generation model handlers
|
|
3
|
+
*
|
|
4
|
+
* Provides text generation using OpenAI's language models.
|
|
5
|
+
*/
|
|
6
|
+
import type { GenerateTextParams, IAgentRuntime } from "@elizaos/core";
|
|
7
|
+
import type { TextStreamResult } from "../types";
|
|
8
|
+
/**
|
|
9
|
+
* Handles TEXT_SMALL model requests.
|
|
10
|
+
*
|
|
11
|
+
* Uses the configured small model (default: gpt-5-mini).
|
|
12
|
+
*
|
|
13
|
+
* @param runtime - The agent runtime
|
|
14
|
+
* @param params - Generation parameters
|
|
15
|
+
* @returns Generated text or stream result
|
|
4
16
|
*/
|
|
5
17
|
export declare function handleTextSmall(runtime: IAgentRuntime, params: GenerateTextParams): Promise<string | TextStreamResult>;
|
|
6
18
|
/**
|
|
7
|
-
* TEXT_LARGE model
|
|
19
|
+
* Handles TEXT_LARGE model requests.
|
|
20
|
+
*
|
|
21
|
+
* Uses the configured large model (default: gpt-5).
|
|
22
|
+
*
|
|
23
|
+
* @param runtime - The agent runtime
|
|
24
|
+
* @param params - Generation parameters
|
|
25
|
+
* @returns Generated text or stream result
|
|
8
26
|
*/
|
|
9
27
|
export declare function handleTextLarge(runtime: IAgentRuntime, params: GenerateTextParams): Promise<string | TextStreamResult>;
|
|
28
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../models/text.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAiB,MAAM,eAAe,CAAC;AAItF,OAAO,KAAK,EAAE,gBAAgB,EAAc,MAAM,UAAU,CAAC;AAqG7D;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAEpC;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAEpC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import type { IAgentRuntime, TokenizeTextParams
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare function handleTokenizerEncode(runtime: IAgentRuntime, { prompt, modelType }: TokenizeTextParams): Promise<number[]>;
|
|
6
|
-
/**
|
|
7
|
-
* TEXT_TOKENIZER_DECODE model handler
|
|
8
|
-
*/
|
|
9
|
-
export declare function handleTokenizerDecode(runtime: IAgentRuntime, { tokens, modelType }: DetokenizeTextParams): Promise<string>;
|
|
1
|
+
import type { DetokenizeTextParams, IAgentRuntime, TokenizeTextParams } from "@elizaos/core";
|
|
2
|
+
export declare function handleTokenizerEncode(runtime: IAgentRuntime, params: TokenizeTextParams): Promise<number[]>;
|
|
3
|
+
export declare function handleTokenizerDecode(runtime: IAgentRuntime, params: DetokenizeTextParams): Promise<string>;
|
|
4
|
+
//# sourceMappingURL=tokenizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenizer.d.ts","sourceRoot":"","sources":["../../models/tokenizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAI7F,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,MAAM,EAAE,CAAC,CAMnB;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAejB"}
|