forked from elizaOS/eliza
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
33 lines (28 loc) · 860 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import {asteraiProvider} from "./providers/asterai.provider.ts";
import type { Plugin } from "@elizaos/core";
import { queryAction } from "./actions/query";
import { AsteraiClient } from "@asterai/client";
export * from "./environment";
export * from "./providers/asterai.provider";
let asteraiClient: AsteraiClient | null = null;
export const getInitAsteraiClient = (
agentId: string,
publicQueryKey: string
): AsteraiClient => {
if (!asteraiClient) {
asteraiClient = new AsteraiClient({
appId: agentId,
queryKey: publicQueryKey,
})
}
return asteraiClient;
};
export const asteraiPlugin: Plugin = {
name: "asterai",
description: "asterai Plugin for Eliza",
providers: [asteraiProvider],
actions: [queryAction],
evaluators: [],
services: [],
};
export default asteraiPlugin;