@aigne/core 0.4.207-4 → 0.4.207
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/agent.js +3 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/agent.js +3 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/lib/cjs/data-type-schema.js +0 -46
- package/lib/cjs/data-type.js +0 -2
- package/lib/cjs/memory.js +0 -32
- package/lib/esm/data-type-schema.js +0 -43
- package/lib/esm/data-type.js +0 -1
- package/lib/esm/memory.js +0 -27
- package/lib/types/data-type-schema.d.ts +0 -46
- package/lib/types/data-type.d.ts +0 -32
- package/lib/types/memory.d.ts +0 -184
package/lib/esm/agent.js
CHANGED
|
@@ -52,6 +52,7 @@ export class Agent extends Runnable {
|
|
|
52
52
|
}));
|
|
53
53
|
}
|
|
54
54
|
async run(input, options) {
|
|
55
|
+
logger.debug(`AIGNE core: run agent ${this.name || this.id} with`, { input });
|
|
55
56
|
const memories = await this.loadMemories(input, this.context);
|
|
56
57
|
const processResult = await this.process(input, { ...options, memories });
|
|
57
58
|
if (options?.stream) {
|
|
@@ -61,6 +62,7 @@ export class Agent extends Runnable {
|
|
|
61
62
|
: objectToRunnableResponseStream(processResult);
|
|
62
63
|
return extractOutputsFromRunnableOutput(stream, async (result) => {
|
|
63
64
|
// TODO: validate result against outputs schema
|
|
65
|
+
logger.debug(`AIGNE core: run agent ${this.name || this.id} success`, { result });
|
|
64
66
|
await this.onResult(result);
|
|
65
67
|
});
|
|
66
68
|
}
|
|
@@ -69,6 +71,7 @@ export class Agent extends Runnable {
|
|
|
69
71
|
: Symbol.asyncIterator in processResult
|
|
70
72
|
? await runnableResponseStreamToObject(processResult)
|
|
71
73
|
: processResult;
|
|
74
|
+
logger.debug(`AIGNE core: run agent ${this.name || this.id} success`, { result });
|
|
72
75
|
// TODO: validate result against outputs schema
|
|
73
76
|
await this.onResult(result);
|
|
74
77
|
return result;
|
package/lib/esm/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from './definitions/data-type';
|
|
|
4
4
|
export * from './definitions/data-type-schema';
|
|
5
5
|
export * from './context';
|
|
6
6
|
export * from './runnable';
|
|
7
|
+
export * from './agent';
|
|
7
8
|
export * from './pipeline-agent';
|
|
8
9
|
export * from './llm-agent';
|
|
9
10
|
export * from './llm-model';
|