Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
c276b8e319
|
2
index.ts
2
index.ts
@@ -88,7 +88,7 @@ async function generate(job: Job) {
|
|||||||
|
|
||||||
// request chat completion
|
// request chat completion
|
||||||
const response = await complete(model, messages, {
|
const response = await complete(model, messages, {
|
||||||
temperature: 1,
|
temperature: 1.0,
|
||||||
minP: 0.1,
|
minP: 0.1,
|
||||||
repeatPenalty: {
|
repeatPenalty: {
|
||||||
penalty: 1.15,
|
penalty: 1.15,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export async function getModel(model: string) {
|
|||||||
});
|
});
|
||||||
const modelPath = await downloader.download();
|
const modelPath = await downloader.download();
|
||||||
const llama = await getLlama({
|
const llama = await getLlama({
|
||||||
maxThreads: 6,
|
maxThreads: 2,
|
||||||
});
|
});
|
||||||
return await llama.loadModel({ modelPath });
|
return await llama.loadModel({ modelPath });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { api } from "misskey-js";
|
import { api } from "misskey-js";
|
||||||
import type { Note } from "misskey-js/entities.js";
|
import type { Note } from "misskey-js/entities.js";
|
||||||
import type { Message } from "./llm";
|
|
||||||
import { sample } from "./util";
|
import { sample } from "./util";
|
||||||
|
|
||||||
export const misskey = new api.APIClient({
|
export const misskey = new api.APIClient({
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"module": "index.ts",
|
"module": "index.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "node-llama-cpp source download",
|
||||||
"start": "bun run index.ts",
|
"start": "bun run index.ts",
|
||||||
"fix": "biome check --write"
|
"fix": "biome check --write"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user