@receptron/graphai_express 3.0.1 → 3.0.2
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/agents.js +3 -2
- package/package.json +7 -7
package/lib/agents.js
CHANGED
|
@@ -40,7 +40,7 @@ exports.agentsList = agentsList;
|
|
|
40
40
|
const agentDoc = (agentDictionary, hostName = "https://example.com", urlPath = "/agent") => {
|
|
41
41
|
return async (req, res) => {
|
|
42
42
|
const { params } = req;
|
|
43
|
-
const
|
|
43
|
+
const agentId = Array.isArray(params.agentId) ? params.agentId[0] : params.agentId;
|
|
44
44
|
const agent = agentDictionary[agentId];
|
|
45
45
|
if (agent === undefined) {
|
|
46
46
|
res.status(404).send("Not found");
|
|
@@ -163,7 +163,8 @@ const agentDispatcherInternal = (agentDictionary, agentFilters = [], isDispatch
|
|
|
163
163
|
console.log("agentDispatcherInternal");
|
|
164
164
|
}
|
|
165
165
|
const { params } = req;
|
|
166
|
-
const
|
|
166
|
+
const agentIdRaw = isDispatch ? params.agentId : req.body.debugInfo.agentId;
|
|
167
|
+
const agentId = Array.isArray(agentIdRaw) ? agentIdRaw[0] : agentIdRaw;
|
|
167
168
|
const { params: agentParams, debugInfo, filterParams, namedInputs /* graphData */ } = req.body;
|
|
168
169
|
const agent = agentDictionary[agentId];
|
|
169
170
|
if (agent === undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@receptron/graphai_express",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "GraphAI express web server middleware.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
"homepage": "https://github.com/receptron/graphai_utils/tree/main/packages/express#readme",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/cors": "^2.8.18",
|
|
31
|
-
"@types/express-serve-static-core": "^5.
|
|
32
|
-
"sinon": "^
|
|
31
|
+
"@types/express-serve-static-core": "^5.1.1",
|
|
32
|
+
"sinon": "^21.0.1",
|
|
33
33
|
"sinon-express-mock": "^2.2.1"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@graphai/agent_filter_utils": "^2.0.0",
|
|
37
|
-
"@graphai/stream_agent_filter": "^2.0.
|
|
38
|
-
"cors": "^2.8.
|
|
39
|
-
"dotenv": "^
|
|
40
|
-
"express": "^5.1
|
|
37
|
+
"@graphai/stream_agent_filter": "^2.0.3",
|
|
38
|
+
"cors": "^2.8.6",
|
|
39
|
+
"dotenv": "^17.2.4",
|
|
40
|
+
"express": "^5.2.1"
|
|
41
41
|
},
|
|
42
42
|
"types": "./lib/index.d.ts",
|
|
43
43
|
"directories": {
|