@aigne/core 0.4.201-0 → 0.4.201-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/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/types/data-type.d.ts +3 -0
- package/lib/types/function-agent.d.ts +2 -6
- package/lib/types/llm-agent.d.ts +2 -6
- package/lib/types/llm-decision-agent.d.ts +2 -6
- package/lib/types/local-function-agent.d.ts +2 -6
- package/lib/types/pipeline-agent.d.ts +4 -6
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/lib/types/data-type.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ export interface DataTypeArray extends DataTypeBase {
|
|
|
30
30
|
defaultValue?: object[];
|
|
31
31
|
items?: OmitPropsFromUnion<DataType, 'id'>;
|
|
32
32
|
}
|
|
33
|
+
export type DataTypes = {
|
|
34
|
+
[name: string]: OmitPropsFromUnion<DataType, 'id' | 'name'>;
|
|
35
|
+
};
|
|
33
36
|
type SchemaTypeInner<T extends Record<string, OmitPropsFromUnion<DataType, 'id' | 'name'>>> = {
|
|
34
37
|
[K in keyof T]: T[K]['type'] extends 'string' ? string : T[K]['type'] extends 'number' ? number : T[K]['type'] extends 'boolean' ? boolean : T[K]['type'] extends 'object' ? object : T[K]['type'] extends 'array' ? object[] : never;
|
|
35
38
|
};
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { DataType, SchemaType } from './data-type';
|
|
1
|
+
import { DataType, DataTypes, SchemaType } from './data-type';
|
|
2
2
|
import { FunctionRunner } from './function-runner';
|
|
3
3
|
import { RunOptions, Runnable, RunnableDefinition, RunnableResponseStream } from './runnable';
|
|
4
4
|
import { OmitPropsFromUnion } from './utils/omit';
|
|
5
5
|
export declare class FunctionAgent<I extends {} = {}, O extends {} = {}> extends Runnable<I, O> {
|
|
6
6
|
definition: FunctionAgentDefinition;
|
|
7
7
|
runner?: FunctionRunner | undefined;
|
|
8
|
-
static create<I extends {
|
|
9
|
-
[name: string]: OmitPropsFromUnion<DataType, 'id' | 'name'>;
|
|
10
|
-
}, O extends {
|
|
11
|
-
[name: string]: OmitPropsFromUnion<DataType, 'id' | 'name'>;
|
|
12
|
-
}>(options: Parameters<typeof createFunctionAgentDefinition<I, O>>[0]): FunctionAgent<SchemaType<I>, SchemaType<O>>;
|
|
8
|
+
static create<I extends {} = {}, O extends {} = {}, Inputs extends DataTypes = {}, Outputs extends DataTypes = {}>(options: Parameters<typeof createFunctionAgentDefinition<Inputs, Outputs>>[0]): FunctionAgent<SchemaType<Inputs> & I, SchemaType<Outputs> & O>;
|
|
13
9
|
constructor(definition: FunctionAgentDefinition, runner?: FunctionRunner | undefined);
|
|
14
10
|
run(input: I, options: RunOptions & {
|
|
15
11
|
stream: true;
|
package/lib/types/llm-agent.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataType, SchemaType } from './data-type';
|
|
1
|
+
import { DataType, DataTypes, SchemaType } from './data-type';
|
|
2
2
|
import { LLMModel, LLMModelInputs, Role } from './llm-model';
|
|
3
3
|
import { RunOptions, Runnable, RunnableDefinition, RunnableResponseStream } from './runnable';
|
|
4
4
|
import { OmitPropsFromUnion } from './utils/omit';
|
|
@@ -6,11 +6,7 @@ import { OrderedRecord } from './utils/ordered-map';
|
|
|
6
6
|
export declare class LLMAgent<I extends {} = {}, O extends {} = {}> extends Runnable<I, O> {
|
|
7
7
|
definition: LLMAgentDefinition;
|
|
8
8
|
model?: LLMModel | undefined;
|
|
9
|
-
static create<I extends {
|
|
10
|
-
[name: string]: OmitPropsFromUnion<DataType, 'id' | 'name'>;
|
|
11
|
-
}, O extends {
|
|
12
|
-
[name: string]: OmitPropsFromUnion<DataType, 'id' | 'name'>;
|
|
13
|
-
}>(options: Parameters<typeof createLLMAgentDefinition<I, O>>[0]): LLMAgent<SchemaType<I>, SchemaType<O>>;
|
|
9
|
+
static create<I extends {} = {}, O extends {} = {}, Inputs extends DataTypes = {}, Outputs extends DataTypes = {}>(options: Parameters<typeof createLLMAgentDefinition<I, O>>[0]): LLMAgent<SchemaType<Inputs> & I, SchemaType<Outputs> & O>;
|
|
14
10
|
constructor(definition: LLMAgentDefinition, model?: LLMModel | undefined);
|
|
15
11
|
run(input: I, options: RunOptions & {
|
|
16
12
|
stream: true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Context } from './context';
|
|
2
|
-
import { DataType, SchemaType } from './data-type';
|
|
2
|
+
import { DataType, DataTypes, SchemaType } from './data-type';
|
|
3
3
|
import { LLMModel, LLMModelInputMessage, LLMModelInputs, LLMModelOptions } from './llm-model';
|
|
4
4
|
import { RunOptions, Runnable, RunnableDefinition, RunnableResponseStream } from './runnable';
|
|
5
5
|
import { OrderedRecord } from './utils';
|
|
@@ -10,11 +10,7 @@ export declare class LLMDecisionAgent<I extends {
|
|
|
10
10
|
definition: LLMDecisionAgentDefinition;
|
|
11
11
|
model?: LLMModel | undefined;
|
|
12
12
|
context?: Context | undefined;
|
|
13
|
-
static create<I extends {
|
|
14
|
-
[name: string]: OmitPropsFromUnion<DataType, 'id' | 'name'>;
|
|
15
|
-
}, O extends {
|
|
16
|
-
[name: string]: OmitPropsFromUnion<DataType, 'id' | 'name'>;
|
|
17
|
-
}>(options: Parameters<typeof createLLMDecisionAgentDefinition<I>>[0]): LLMDecisionAgent<SchemaType<I>, SchemaType<O>>;
|
|
13
|
+
static create<I extends {} = {}, O extends {} = {}, Inputs extends DataTypes = {}, Outputs extends DataTypes = {}>(options: Parameters<typeof createLLMDecisionAgentDefinition<Inputs>>[0]): LLMDecisionAgent<SchemaType<Inputs> & I, SchemaType<Outputs> & O>;
|
|
18
14
|
constructor(definition: LLMDecisionAgentDefinition, model?: LLMModel | undefined, context?: Context | undefined);
|
|
19
15
|
run(input: I, options: RunOptions & {
|
|
20
16
|
stream: true;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import type { Context } from './context';
|
|
2
|
-
import { DataType, SchemaType } from './data-type';
|
|
2
|
+
import { DataType, DataTypes, SchemaType } from './data-type';
|
|
3
3
|
import { RunOptions, Runnable, RunnableDefinition, RunnableResponse, RunnableResponseStream } from './runnable';
|
|
4
4
|
import { OmitPropsFromUnion } from './utils/omit';
|
|
5
5
|
export declare class LocalFunctionAgent<I extends {} = {}, O extends {} = {}, State = {}> extends Runnable<I, O> {
|
|
6
6
|
definition: LocalFunctionAgentDefinition<I, O, State>;
|
|
7
7
|
context?: Context<State> | undefined;
|
|
8
|
-
static create<I extends {
|
|
9
|
-
[name: string]: OmitPropsFromUnion<DataType, 'id' | 'name'>;
|
|
10
|
-
}, O extends {
|
|
11
|
-
[name: string]: OmitPropsFromUnion<DataType, 'id' | 'name'>;
|
|
12
|
-
}, State = {}>(options: Parameters<typeof createLocalFunctionAgentDefinition<I, O, State>>[0]): LocalFunctionAgent<SchemaType<I>, SchemaType<O>, State>;
|
|
8
|
+
static create<I extends {} = {}, O extends {} = {}, State = {}, Inputs extends DataTypes = {}, Outputs extends DataTypes = {}>(options: Parameters<typeof createLocalFunctionAgentDefinition<Inputs, Outputs, State>>[0]): LocalFunctionAgent<SchemaType<Inputs> & I, SchemaType<Outputs> & O, State>;
|
|
13
9
|
constructor(definition: LocalFunctionAgentDefinition<I, O, State>, context?: Context<State> | undefined);
|
|
14
10
|
run(input: I, options: RunOptions & {
|
|
15
11
|
stream: true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Context } from './context';
|
|
2
|
-
import { DataType, SchemaType } from './data-type';
|
|
2
|
+
import { DataType, DataTypes, SchemaType } from './data-type';
|
|
3
3
|
import { RunOptions, Runnable, RunnableDefinition, RunnableOutput, RunnableResponseStream } from './runnable';
|
|
4
4
|
import { OmitPropsFromUnion } from './utils/omit';
|
|
5
5
|
import { OrderedRecord } from './utils/ordered-map';
|
|
@@ -8,14 +8,12 @@ export declare class PipelineAgent<I extends {
|
|
|
8
8
|
} = {}, O extends {} = {}> extends Runnable<I, O> {
|
|
9
9
|
definition: PipelineAgentDefinition;
|
|
10
10
|
context?: Context | undefined;
|
|
11
|
-
static create<I extends {
|
|
12
|
-
[name: string]:
|
|
13
|
-
}, O extends {
|
|
14
|
-
[name: string]: OmitPropsFromUnion<DataType, 'id' | 'name'> & {
|
|
11
|
+
static create<I extends {} = {}, O extends {} = {}, Inputs extends DataTypes = {}, Outputs extends {
|
|
12
|
+
[name: string]: DataTypes[string] & {
|
|
15
13
|
fromVariable: string;
|
|
16
14
|
fromVariablePropPath?: string[];
|
|
17
15
|
};
|
|
18
|
-
}>(options: Parameters<typeof createPipelineAgentDefinition<
|
|
16
|
+
} = {}>(options: Parameters<typeof createPipelineAgentDefinition<Inputs, Outputs>>[0]): PipelineAgent<SchemaType<Inputs> & I, SchemaType<Outputs> & O>;
|
|
19
17
|
constructor(definition: PipelineAgentDefinition, context?: Context | undefined);
|
|
20
18
|
run(input: I, options: RunOptions & {
|
|
21
19
|
stream: true;
|