@receptron/graphai_express 0.0.3 → 0.0.4

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 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
- T.B.D.
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/lib/type";
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 test_utils_1 = require("graphai/lib/utils/test_utils");
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, test_utils_1.agentFilterRunnerBuilder)(agentFilters);
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",
3
+ "version": "0.0.4",
4
4
  "description": "GraphAI express web server middleware.",
5
5
  "main": "lib/express.js",
6
6
  "files": [
@@ -42,7 +42,7 @@
42
42
  "deepmerge": "^4.3.1",
43
43
  "dotenv": "^16.4.5",
44
44
  "express": "^4.19.2",
45
- "graphai": "0.4.2",
45
+ "graphai": "0.4.3",
46
46
  "groq-sdk": "^0.3.3",
47
47
  "openai": "^4.12.4",
48
48
  "slashgpt": "^0.0.8",