Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
16a902a632
|
|||
|
dfb23d88f5
|
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.0,
|
temperature: 1,
|
||||||
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: 2,
|
maxThreads: 6,
|
||||||
});
|
});
|
||||||
return await llama.loadModel({ modelPath });
|
return await llama.loadModel({ modelPath });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
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,7 +3,6 @@
|
|||||||
"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