@forwardimpact/svcllm 0.1.97 → 0.1.98
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/package.json +3 -2
- package/server.js +20 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forwardimpact/svcllm",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.98",
|
|
4
4
|
"description": "Language model service providing embeddings and completions for Guide",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "D. Olsson <hi@senzilla.io>",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"@forwardimpact/libharness": "^0.1.5"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
-
"proto/"
|
|
28
|
+
"proto/",
|
|
29
|
+
"server.js"
|
|
29
30
|
],
|
|
30
31
|
"publishConfig": {
|
|
31
32
|
"access": "public"
|
package/server.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Server, createClient } from "@forwardimpact/librpc";
|
|
2
|
+
import { createServiceConfig } from "@forwardimpact/libconfig";
|
|
3
|
+
import { createTracer } from "@forwardimpact/librpc";
|
|
4
|
+
import { createLogger } from "@forwardimpact/libtelemetry";
|
|
5
|
+
|
|
6
|
+
import { LlmService } from "./index.js";
|
|
7
|
+
|
|
8
|
+
const config = await createServiceConfig("llm");
|
|
9
|
+
|
|
10
|
+
// Initialize observability
|
|
11
|
+
const logger = createLogger("llm");
|
|
12
|
+
const tracer = await createTracer("llm");
|
|
13
|
+
|
|
14
|
+
// Create memory client for fetching windows
|
|
15
|
+
const memoryClient = await createClient("memory", logger, tracer);
|
|
16
|
+
|
|
17
|
+
const service = new LlmService(config, memoryClient);
|
|
18
|
+
const server = new Server(service, config, logger, tracer);
|
|
19
|
+
|
|
20
|
+
await server.start();
|