@receptron/graphai_express 0.0.3 → 0.0.5
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/README.md +4 -2
- package/lib/express.d.ts +1 -1
- package/lib/express.js +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -29,9 +29,11 @@ app.post(apiPrefix + "/stream/:agentId", streamAgentDispatcher());
|
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
### from curl
|
|
32
|
+
### Test from curl
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
```
|
|
35
|
+
curl -X POST -H "Content-Type: application/json" -d '{"params": {"message" : "hello"}}' http://localhost:8085/api/agents/echoAgent
|
|
36
|
+
```
|
|
35
37
|
|
|
36
38
|
### from GraphAI Client
|
|
37
39
|
|
package/lib/express.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import express from "./express";
|
|
2
|
-
import { AgentFilterInfo } from "graphai
|
|
2
|
+
import type { AgentFilterInfo } from "graphai";
|
|
3
3
|
export declare const agentsList: (hostName?: string, urlPath?: string) => (req: express.Request, res: express.Response) => Promise<void>;
|
|
4
4
|
export declare const agentDoc: (hostName?: string, urlPath?: string) => (req: express.Request, res: express.Response) => Promise<void>;
|
|
5
5
|
export declare const agentDispatcher: (agentFilters?: AgentFilterInfo[]) => (req: express.Request, res: express.Response) => Promise<express.Response<any, Record<string, any>>>;
|
package/lib/express.js
CHANGED
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.streamAgentDispatcher = exports.agentDispatcher = exports.agentDoc = exports.agentsList = void 0;
|
|
27
|
-
const
|
|
27
|
+
const graphai_1 = require("graphai");
|
|
28
28
|
const stream_1 = require("graphai/lib/experimental_agent_filters/stream");
|
|
29
29
|
const agents = __importStar(require("graphai/lib/experimental_agents"));
|
|
30
30
|
const agentDictionary = agents;
|
|
@@ -133,7 +133,7 @@ const agentDispatcherInternal = (agentFilters = []) => {
|
|
|
133
133
|
agents,
|
|
134
134
|
filterParams: {},
|
|
135
135
|
};
|
|
136
|
-
const agentFilterRunner = (0,
|
|
136
|
+
const agentFilterRunner = (0, graphai_1.agentFilterRunnerBuilder)(agentFilters);
|
|
137
137
|
const result = await agentFilterRunner(context, agent.agent);
|
|
138
138
|
return result;
|
|
139
139
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@receptron/graphai_express",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "GraphAI express web server middleware.",
|
|
5
5
|
"main": "lib/express.js",
|
|
6
6
|
"files": [
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"eslint": "eslint --fix",
|
|
12
12
|
"server": "ts-node -r tsconfig-paths/register test/express.ts",
|
|
13
13
|
"test_stream": "ts-node -r tsconfig-paths/register test/stream_client.ts",
|
|
14
|
+
"test": "ts-node -r tsconfig-paths/register test/client.ts",
|
|
14
15
|
"format": "prettier --write '{src,test}/**/*.{yaml,ts,json}'",
|
|
15
|
-
"test": "node --test -r tsconfig-paths/register --require ts-node/register ./test/test_*.ts",
|
|
16
16
|
"b": "yarn run format && yarn run eslint && yarn run build"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"deepmerge": "^4.3.1",
|
|
43
43
|
"dotenv": "^16.4.5",
|
|
44
44
|
"express": "^4.19.2",
|
|
45
|
-
"graphai": "0.4.
|
|
45
|
+
"graphai": "0.4.3",
|
|
46
46
|
"groq-sdk": "^0.3.3",
|
|
47
47
|
"openai": "^4.12.4",
|
|
48
|
-
"slashgpt": "^0.
|
|
48
|
+
"slashgpt": "^0.1.1",
|
|
49
49
|
"tiktoken": "^1.0.14",
|
|
50
50
|
"wikipedia": "^2.1.2",
|
|
51
51
|
"xml2js": "^0.6.2",
|