Refactor
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# arubinochan-bot
|
||||
|
||||
Misskey のタイムラインを読み、ローカル LLM で「あるびのちゃん」として投稿する bot です。
|
||||
|
||||
To install dependencies:
|
||||
|
||||
```bash
|
||||
@@ -12,4 +14,48 @@ To run:
|
||||
bun run index.ts
|
||||
```
|
||||
|
||||
This project was created using `bun init` in bun v1.1.33. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
|
||||
Dry run without posting:
|
||||
|
||||
```bash
|
||||
bun run index.ts --test
|
||||
```
|
||||
|
||||
Useful runtime options:
|
||||
|
||||
```bash
|
||||
bun run index.ts --test --harness speaker --politeness auto --sampling creative
|
||||
```
|
||||
|
||||
- `--harness speaker`: default. Starts generation with `あるびのちゃん:\n` and parses the following body.
|
||||
- `--harness tagged`: wraps output in a lightweight `<post>` envelope.
|
||||
- `--harness json`: legacy JSON grammar harness.
|
||||
- `--politeness auto`: default. Rephrases once only when the generated text does not look polite enough.
|
||||
- `--politeness always`: always runs the style converter.
|
||||
- `--politeness never`: disables style conversion.
|
||||
- `--sampling creative`: default. Keeps the more idiosyncratic tone used by the bot.
|
||||
- `--sampling model-default`: uses model-card-like sampling parameters for supported models.
|
||||
|
||||
Environment variables:
|
||||
|
||||
```env
|
||||
MISSKEY_ORIGIN=https://misskey.example.net
|
||||
MISSKEY_CREDENTIAL=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
MODEL="LiquidAI/LFM2-2.6B-GGUF:Q5_K_M"
|
||||
HARNESS="speaker"
|
||||
POLITENESS="auto"
|
||||
SAMPLING="creative"
|
||||
```
|
||||
|
||||
Evaluation without posting:
|
||||
|
||||
```bash
|
||||
bun run evaluate.ts --all-env --candidates --runs 1 --output .evaluation-results.jsonl
|
||||
```
|
||||
|
||||
Resume a crashed/interrupted evaluation:
|
||||
|
||||
```bash
|
||||
bun run evaluate.ts --all-env --candidates --runs 1 --output .evaluation-results.jsonl --resume
|
||||
```
|
||||
|
||||
See [EVALUATION.md](./EVALUATION.md) for the harness/model comparison and the current recommendation.
|
||||
|
||||
Reference in New Issue
Block a user