llm-exe 2.0.0-beta.9 → 2.1.1
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 +4 -5
- package/dist/index.d.ts +4 -5
- package/dist/index.js +421 -350
- package/dist/index.mjs +421 -350
- package/package.json +1 -1
- package/readme.md +31 -37
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { JSONSchema, FromSchema } from 'json-schema-to-ts';
|
|
2
2
|
import { Narrow } from 'json-schema-to-ts/lib/types/type-utils';
|
|
3
|
-
import Handlebars from 'handlebars';
|
|
4
3
|
|
|
5
4
|
type PrimitiveValue = bigint | boolean | null | number | string | symbol | undefined;
|
|
6
5
|
type ObjectValue = PrimitiveValue | PlainObject | ObjectArray;
|
|
@@ -995,7 +994,7 @@ interface BaseRequest<_T extends Record<string, any>> {
|
|
|
995
994
|
interface BaseLlm<_T extends BaseLlCall = BaseLlCall> extends BaseRequest<_T> {
|
|
996
995
|
}
|
|
997
996
|
|
|
998
|
-
type LlmProvider = "openai.chat" | "openai.embedding" | "openai.chat-mock" | "anthropic.chat" | "amazon:anthropic.chat" | "amazon:meta.chat" | "amazon.embedding";
|
|
997
|
+
type LlmProvider = "openai.chat" | "openai.embedding" | "openai.chat-mock" | "anthropic.chat" | "amazon:anthropic.chat" | "amazon:meta.chat" | "amazon:nova.chat" | "amazon.embedding";
|
|
999
998
|
interface Config<Pk = LlmProviderKey> {
|
|
1000
999
|
key: Pk;
|
|
1001
1000
|
provider: LlmProvider;
|
|
@@ -1140,9 +1139,6 @@ declare function importHelpers(_helpers: {
|
|
|
1140
1139
|
[key in string]: (...args: any[]) => any;
|
|
1141
1140
|
}): PromptHelper[];
|
|
1142
1141
|
|
|
1143
|
-
declare function registerPartials(partials: any[], instance?: typeof Handlebars): void;
|
|
1144
|
-
declare function registerHelpers(helpers: any[], instance?: typeof Handlebars): void;
|
|
1145
|
-
|
|
1146
1142
|
declare function filterObjectOnSchema(schema: any, doc: any, detach?: any, property?: string): any;
|
|
1147
1143
|
|
|
1148
1144
|
declare const asyncCallWithTimeout: <T = any>(asyncPromise: Promise<T>, timeLimit?: number) => Promise<T>;
|
|
@@ -1151,6 +1147,9 @@ declare const maybeStringifyJSON: (objOrMaybeString: any) => string;
|
|
|
1151
1147
|
declare const maybeParseJSON: <Expected = any>(objOrMaybeJSON: any) => Expected;
|
|
1152
1148
|
declare function isObjectStringified(maybeObject: string): boolean;
|
|
1153
1149
|
|
|
1150
|
+
declare function registerHelpers(helpers: any[]): void;
|
|
1151
|
+
declare function registerPartials(partials: any[]): void;
|
|
1152
|
+
|
|
1154
1153
|
declare const index_assert: typeof assert;
|
|
1155
1154
|
declare const index_asyncCallWithTimeout: typeof asyncCallWithTimeout;
|
|
1156
1155
|
declare const index_defineSchema: typeof defineSchema;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { JSONSchema, FromSchema } from 'json-schema-to-ts';
|
|
2
2
|
import { Narrow } from 'json-schema-to-ts/lib/types/type-utils';
|
|
3
|
-
import Handlebars from 'handlebars';
|
|
4
3
|
|
|
5
4
|
type PrimitiveValue = bigint | boolean | null | number | string | symbol | undefined;
|
|
6
5
|
type ObjectValue = PrimitiveValue | PlainObject | ObjectArray;
|
|
@@ -995,7 +994,7 @@ interface BaseRequest<_T extends Record<string, any>> {
|
|
|
995
994
|
interface BaseLlm<_T extends BaseLlCall = BaseLlCall> extends BaseRequest<_T> {
|
|
996
995
|
}
|
|
997
996
|
|
|
998
|
-
type LlmProvider = "openai.chat" | "openai.embedding" | "openai.chat-mock" | "anthropic.chat" | "amazon:anthropic.chat" | "amazon:meta.chat" | "amazon.embedding";
|
|
997
|
+
type LlmProvider = "openai.chat" | "openai.embedding" | "openai.chat-mock" | "anthropic.chat" | "amazon:anthropic.chat" | "amazon:meta.chat" | "amazon:nova.chat" | "amazon.embedding";
|
|
999
998
|
interface Config<Pk = LlmProviderKey> {
|
|
1000
999
|
key: Pk;
|
|
1001
1000
|
provider: LlmProvider;
|
|
@@ -1140,9 +1139,6 @@ declare function importHelpers(_helpers: {
|
|
|
1140
1139
|
[key in string]: (...args: any[]) => any;
|
|
1141
1140
|
}): PromptHelper[];
|
|
1142
1141
|
|
|
1143
|
-
declare function registerPartials(partials: any[], instance?: typeof Handlebars): void;
|
|
1144
|
-
declare function registerHelpers(helpers: any[], instance?: typeof Handlebars): void;
|
|
1145
|
-
|
|
1146
1142
|
declare function filterObjectOnSchema(schema: any, doc: any, detach?: any, property?: string): any;
|
|
1147
1143
|
|
|
1148
1144
|
declare const asyncCallWithTimeout: <T = any>(asyncPromise: Promise<T>, timeLimit?: number) => Promise<T>;
|
|
@@ -1151,6 +1147,9 @@ declare const maybeStringifyJSON: (objOrMaybeString: any) => string;
|
|
|
1151
1147
|
declare const maybeParseJSON: <Expected = any>(objOrMaybeJSON: any) => Expected;
|
|
1152
1148
|
declare function isObjectStringified(maybeObject: string): boolean;
|
|
1153
1149
|
|
|
1150
|
+
declare function registerHelpers(helpers: any[]): void;
|
|
1151
|
+
declare function registerPartials(partials: any[]): void;
|
|
1152
|
+
|
|
1154
1153
|
declare const index_assert: typeof assert;
|
|
1155
1154
|
declare const index_asyncCallWithTimeout: typeof asyncCallWithTimeout;
|
|
1156
1155
|
declare const index_defineSchema: typeof defineSchema;
|