Refactor (7)
This commit is contained in:
4
index.ts
4
index.ts
@@ -54,6 +54,7 @@ const replyJobPrompt = getSystemPrompt(
|
||||
"ユーザがあなたへのメッセージを送ってきています。あるびのちゃんとして、発言に返信してください。",
|
||||
);
|
||||
|
||||
async function rephrase(text: string) {
|
||||
await using rephraseSession = new LlmSession(
|
||||
model,
|
||||
getSystemPrompt(
|
||||
@@ -61,7 +62,6 @@ await using rephraseSession = new LlmSession(
|
||||
),
|
||||
);
|
||||
await rephraseSession.init();
|
||||
async function rephrase(text: string) {
|
||||
const res = parseResponse(
|
||||
grammar,
|
||||
await rephraseSession.prompt(JSON.stringify({ text }), {
|
||||
@@ -94,9 +94,9 @@ type Job =
|
||||
history: Note[];
|
||||
};
|
||||
|
||||
async function processPostJob() {
|
||||
await using postJobSession = new LlmSession(model, postJobPrompt);
|
||||
await postJobSession.init();
|
||||
async function processPostJob() {
|
||||
const notes = await getNotes(10, 0, 5);
|
||||
const input = notes.map(formatNote).join("\n");
|
||||
const text = parseResponse(
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"misskey-js": "^2025.12.2",
|
||||
"node-llama-cpp": "^3.16.2",
|
||||
"node-llama-cpp": "^3.17.1",
|
||||
"openai": "5.0.0-alpha.0",
|
||||
"reconnecting-websocket": "^4.4.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user