@agentica/rpc 0.11.0 → 0.12.0
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/AgenticaRpcService.d.ts +1 -2
- package/lib/AgenticaRpcService.js.map +1 -1
- package/lib/IAgenticaRpcListener.d.ts +5 -10
- package/lib/IAgenticaRpcService.d.ts +1 -2
- package/lib/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/AgenticaRpcService.ts +2 -6
- package/src/IAgenticaRpcListener.ts +5 -12
- package/src/IAgenticaRpcService.ts +1 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Agentica, IAgenticaController } from "@agentica/core";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
-
import { Primitive } from "typia";
|
|
4
3
|
import { IAgenticaRpcListener } from "./IAgenticaRpcListener";
|
|
5
4
|
import { IAgenticaRpcService } from "./IAgenticaRpcService";
|
|
6
5
|
/**
|
|
@@ -61,7 +60,7 @@ export declare class AgenticaRpcService<Model extends ILlmSchema.Model> implemen
|
|
|
61
60
|
/**
|
|
62
61
|
* @inheritDoc
|
|
63
62
|
*/
|
|
64
|
-
getControllers(): Promise<
|
|
63
|
+
getControllers(): Promise<IAgenticaController<Model>[]>;
|
|
65
64
|
}
|
|
66
65
|
export declare namespace AgenticaRpcService {
|
|
67
66
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgenticaRpcService.js","sourceRoot":"","sources":["../src/AgenticaRpcService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAa,kBAAkB;IAG7B;;;;OAIG;IACH,YAAoC,KAAuC;QAAvC,UAAK,GAAL,KAAK,CAAkC;QACzE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;QAElC,sBAAsB;QACtB,KAAK,CAAC,EAAE,CAA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|
|
@@ -51,17 +50,13 @@ export interface IAgenticaRpcListener {
|
|
|
51
50
|
*
|
|
52
51
|
* @param evt Event of a description of function execution results
|
|
53
52
|
*/
|
|
54
|
-
describe(evt:
|
|
55
|
-
text: string;
|
|
56
|
-
}): Promise<void>;
|
|
53
|
+
describe(evt: IAgenticaEventJson.IDescribe): Promise<void>;
|
|
57
54
|
/**
|
|
58
55
|
* Text conversation message.
|
|
59
56
|
*
|
|
60
57
|
* @param evt Event of a text conversation message
|
|
61
58
|
*/
|
|
62
|
-
text(evt:
|
|
63
|
-
text: string;
|
|
64
|
-
}): Promise<void>;
|
|
59
|
+
text(evt: IAgenticaEventJson.IText): Promise<void>;
|
|
65
60
|
/**
|
|
66
61
|
* Initialize the AI agent.
|
|
67
62
|
*
|
|
@@ -78,7 +73,7 @@ export interface IAgenticaRpcListener {
|
|
|
78
73
|
*
|
|
79
74
|
* @param evt Event of selecting a function to call
|
|
80
75
|
*/
|
|
81
|
-
select?(evt:
|
|
76
|
+
select?(evt: IAgenticaEventJson.ISelect): Promise<void>;
|
|
82
77
|
/**
|
|
83
78
|
* Cancel a function to call.
|
|
84
79
|
*
|
|
@@ -86,7 +81,7 @@ export interface IAgenticaRpcListener {
|
|
|
86
81
|
*
|
|
87
82
|
* @param evt Event of canceling a function to call
|
|
88
83
|
*/
|
|
89
|
-
cancel?(evt:
|
|
84
|
+
cancel?(evt: IAgenticaEventJson.ICancel): Promise<void>;
|
|
90
85
|
/**
|
|
91
86
|
* Call a function.
|
|
92
87
|
*
|
|
@@ -104,7 +99,7 @@ export interface IAgenticaRpcListener {
|
|
|
104
99
|
* @param evt Event of a function calling
|
|
105
100
|
* @return New arguments if you want to modify, otherwise null or undefined
|
|
106
101
|
*/
|
|
107
|
-
call?(evt:
|
|
102
|
+
call?(evt: IAgenticaEventJson.ICall): Promise<object | null | undefined>;
|
|
108
103
|
/**
|
|
109
104
|
* Executition of a function.
|
|
110
105
|
*
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IAgenticaController } from "@agentica/core";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
-
import { Primitive } from "typia";
|
|
4
3
|
/**
|
|
5
4
|
* RPC interface of AI agent service.
|
|
6
5
|
*
|
|
@@ -35,5 +34,5 @@ export interface IAgenticaRpcService<Model extends ILlmSchema.Model> {
|
|
|
35
34
|
* Get controllers, collection of functions that would be
|
|
36
35
|
* called by the AI chatbot.
|
|
37
36
|
*/
|
|
38
|
-
getControllers(): Promise<
|
|
37
|
+
getControllers(): Promise<IAgenticaController<Model>[]>;
|
|
39
38
|
}
|
package/lib/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/AgenticaRpcService.ts"],"sourcesContent":[null],"names":["AgenticaRpcService","constructor","props","this","agent","listener","on","async","evt","text","Object","assign","primitive","join","describe","initialize","select","cancel","args","call","arguments","execute","conversate","content","getControllers","obj","JSON","parse","stringify"],"mappings":"MAkDaA;IAQX,WAAAC,CAAoCC;QAAAC,KAAKD,QAALA;QAClC,OAAME,OAAOC,YAAeH;QAG5BE,MAAME,GAAG,SAAQC,MAAOC,OACtBH,SAASI,KAAKC,OAAOC,OAAOC,UAAUJ,MAAM;YAAEC,YAAYD,IAAIK;;QAEhET,MAAME,GAAG,aAAYC,MAAOC,OAC1BH,SAASS,SACPJ,OAAOC,OAAOC,UAAUJ,MAAM;YAAEC,YAAYD,IAAIK;;QAKpDT,MAAME,GAAG,eAAeE,OAAQH,SAASU,WAAYH,UAAUJ;QAC/DJ,MAAME,GAAG,WAAWE,OAAQH,SAASW,OAAQJ,UAAUJ;QACvDJ,MAAME,GAAG,WAAWE,OAAQH,SAASY,OAAQL,UAAUJ;QACvDJ,MAAME,GAAG,SAAQC,MAAOC;YACtB,MAAMU,aAAwCb,SAASc,KACrDP,UAAUJ;YAEZ,IAAIU,MAAMV,IAAIY,YAAYF;AAAI;QAEhCd,MAAME,GAAG,YAAYE,OAAQH,SAASgB,QAAST,UAAUJ;;IAMpD,gBAAMc,CAAWC;cAChBpB,KAAKD,MAAME,MAAMkB,WAAWC;;IAM7B,oBAAMC;
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/AgenticaRpcService.ts"],"sourcesContent":[null],"names":["AgenticaRpcService","constructor","props","this","agent","listener","on","async","evt","text","Object","assign","primitive","join","describe","initialize","select","cancel","args","call","arguments","execute","conversate","content","getControllers","obj","JSON","parse","stringify"],"mappings":"MAkDaA;IAQX,WAAAC,CAAoCC;QAAAC,KAAKD,QAALA;QAClC,OAAME,OAAOC,YAAeH;QAG5BE,MAAME,GAAG,SAAQC,MAAOC,OACtBH,SAASI,KAAKC,OAAOC,OAAOC,UAAUJ,MAAM;YAAEC,YAAYD,IAAIK;;QAEhET,MAAME,GAAG,aAAYC,MAAOC,OAC1BH,SAASS,SACPJ,OAAOC,OAAOC,UAAUJ,MAAM;YAAEC,YAAYD,IAAIK;;QAKpDT,MAAME,GAAG,eAAeE,OAAQH,SAASU,WAAYH,UAAUJ;QAC/DJ,MAAME,GAAG,WAAWE,OAAQH,SAASW,OAAQJ,UAAUJ;QACvDJ,MAAME,GAAG,WAAWE,OAAQH,SAASY,OAAQL,UAAUJ;QACvDJ,MAAME,GAAG,SAAQC,MAAOC;YACtB,MAAMU,aAAwCb,SAASc,KACrDP,UAAUJ;YAEZ,IAAIU,MAAMV,IAAIY,YAAYF;AAAI;QAEhCd,MAAME,GAAG,YAAYE,OAAQH,SAASgB,QAAST,UAAUJ;;IAMpD,gBAAMc,CAAWC;cAChBpB,KAAKD,MAAME,MAAMkB,WAAWC;;IAM7B,oBAAMC;QACX,OAAOrB,KAAKD,MAAME,MAAMoB;;;;AAuB5B,MAAMZ,YAAgBa,OACpBC,KAAKC,MAAMD,KAAKE,UAAUH;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentica/rpc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"description": "Agentic AI Library specialized in LLM Function Calling",
|
|
6
6
|
"scripts": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"src"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@agentica/core": "^0.
|
|
40
|
+
"@agentica/core": "^0.12.0",
|
|
41
41
|
"@samchon/openapi": "^3.0.0",
|
|
42
42
|
"chalk": "4.1.2",
|
|
43
43
|
"openai": "^4.80.0",
|
|
@@ -92,12 +92,8 @@ export class AgenticaRpcService<Model extends ILlmSchema.Model>
|
|
|
92
92
|
/**
|
|
93
93
|
* @inheritDoc
|
|
94
94
|
*/
|
|
95
|
-
public async getControllers(): Promise<
|
|
96
|
-
|
|
97
|
-
> {
|
|
98
|
-
return this.props.agent.getControllers() satisfies ReadonlyArray<
|
|
99
|
-
IAgenticaController<Model>
|
|
100
|
-
> as Primitive<IAgenticaController<Model>>[];
|
|
95
|
+
public async getControllers(): Promise<IAgenticaController<Model>[]> {
|
|
96
|
+
return this.props.agent.getControllers() as IAgenticaController<Model>[];
|
|
101
97
|
}
|
|
102
98
|
}
|
|
103
99
|
export namespace AgenticaRpcService {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IAgenticaEventJson } from "@agentica/core";
|
|
2
|
-
import { Primitive } from "typia";
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* RPC interface of AI agent listener.
|
|
@@ -52,18 +51,14 @@ export interface IAgenticaRpcListener {
|
|
|
52
51
|
*
|
|
53
52
|
* @param evt Event of a description of function execution results
|
|
54
53
|
*/
|
|
55
|
-
describe(
|
|
56
|
-
evt: Primitive<IAgenticaEventJson.IDescribe> & { text: string },
|
|
57
|
-
): Promise<void>;
|
|
54
|
+
describe(evt: IAgenticaEventJson.IDescribe): Promise<void>;
|
|
58
55
|
|
|
59
56
|
/**
|
|
60
57
|
* Text conversation message.
|
|
61
58
|
*
|
|
62
59
|
* @param evt Event of a text conversation message
|
|
63
60
|
*/
|
|
64
|
-
text(
|
|
65
|
-
evt: Primitive<IAgenticaEventJson.IText> & { text: string },
|
|
66
|
-
): Promise<void>;
|
|
61
|
+
text(evt: IAgenticaEventJson.IText): Promise<void>;
|
|
67
62
|
|
|
68
63
|
/**
|
|
69
64
|
* Initialize the AI agent.
|
|
@@ -82,7 +77,7 @@ export interface IAgenticaRpcListener {
|
|
|
82
77
|
*
|
|
83
78
|
* @param evt Event of selecting a function to call
|
|
84
79
|
*/
|
|
85
|
-
select?(evt:
|
|
80
|
+
select?(evt: IAgenticaEventJson.ISelect): Promise<void>;
|
|
86
81
|
|
|
87
82
|
/**
|
|
88
83
|
* Cancel a function to call.
|
|
@@ -91,7 +86,7 @@ export interface IAgenticaRpcListener {
|
|
|
91
86
|
*
|
|
92
87
|
* @param evt Event of canceling a function to call
|
|
93
88
|
*/
|
|
94
|
-
cancel?(evt:
|
|
89
|
+
cancel?(evt: IAgenticaEventJson.ICancel): Promise<void>;
|
|
95
90
|
|
|
96
91
|
/**
|
|
97
92
|
* Call a function.
|
|
@@ -110,9 +105,7 @@ export interface IAgenticaRpcListener {
|
|
|
110
105
|
* @param evt Event of a function calling
|
|
111
106
|
* @return New arguments if you want to modify, otherwise null or undefined
|
|
112
107
|
*/
|
|
113
|
-
call?(
|
|
114
|
-
evt: Primitive<IAgenticaEventJson.ICall>,
|
|
115
|
-
): Promise<object | null | undefined>;
|
|
108
|
+
call?(evt: IAgenticaEventJson.ICall): Promise<object | null | undefined>;
|
|
116
109
|
|
|
117
110
|
/**
|
|
118
111
|
* Executition of a function.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IAgenticaController } from "@agentica/core";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
-
import { Primitive } from "typia";
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* RPC interface of AI agent service.
|
|
@@ -37,5 +36,5 @@ export interface IAgenticaRpcService<Model extends ILlmSchema.Model> {
|
|
|
37
36
|
* Get controllers, collection of functions that would be
|
|
38
37
|
* called by the AI chatbot.
|
|
39
38
|
*/
|
|
40
|
-
getControllers(): Promise<
|
|
39
|
+
getControllers(): Promise<IAgenticaController<Model>[]>;
|
|
41
40
|
}
|