Skip to content

Commit 24d6b68

Browse files
committed
chore: v0.4.6
1 parent 1bc9e9d commit 24d6b68

File tree

14 files changed

+213
-36
lines changed

14 files changed

+213
-36
lines changed

.scripts/seed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as toml from 'jsr:@std/toml';
66
import * as path from 'jsr:@std/path';
77
import * as collections from "jsr:@std/collections/deep-merge";
88

9-
const VERSION = "0.4.5";
9+
const VERSION = "0.4.6";
1010

1111
type ValueSeed = {
1212
// Path relative to the project root

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@avcodes/harbor-app",
33
"private": true,
4-
"version": "0.4.5",
4+
"version": "0.4.6",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

app/src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src-tauri/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

22
[package]
33
name = "harbor-app"
4-
version = "0.4.5"
4+
version = "0.4.6"
55
description = "A companion app for Harbor LLM toolkit"
66
authors = ["av"]
77
edition = "2021"
88

99
[lib]
1010
name = "harbor_lib"
11-
crate-type = ["staticlib", "cdylib", "rlib"]
11+
crate-type = ["staticlib","cdylib","rlib"]
1212

1313
[build-dependencies.tauri-build]
1414
version = "2.1.0"
@@ -24,7 +24,7 @@ tauri-plugin-pty = "0.2"
2424

2525
[dependencies.tauri]
2626
version = "2.4.0"
27-
features = ["protocol-asset", "tray-icon"]
27+
features = ["protocol-asset","tray-icon"]
2828

2929
[dependencies.serde]
3030
version = "1"

app/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2.4.0",
33
"productName": "Harbor",
4-
"version": "0.4.5",
4+
"version": "0.4.6",
55
"identifier": "com.harbor.app",
66
"build": {
77
"beforeDevCommand": "bun run dev",

docs/2.-Services.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ The text-based terminal client for Ollama.
5656
- <a href="https://github.com/av/harbor/wiki/2.1.7-Frontend:-parllama"><img src="https://github.com/paulrobello.png?size=200" alt="Parllama logo" width="12" height="12" /> Parllama</a> <span style="opacity: 0.5;">`Frontend`</span><br/>
5757
TUI for Ollama
5858

59+
- <a href="https://github.com/av/harbor/wiki/2.1.15-Frontend-SillyTavern"><img src="https://www.google.com/s2/favicons?domain=sillytavern.app&sz=128" alt="SillyTavern logo" width="12" height="12" /> SillyTavern</a> <span style="opacity: 0.5;">`Frontend`</span><br/>
60+
Feature-rich LLM chat frontend for power users. Supports multiple AI backends, personas, advanced prompting, and extensions.
61+
5962
# Backends
6063

6164
This section covers services that provide the LLM inference capabilities.

docs/2.2.2-Backend&colon-llama.cpp.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ You can find GGUF models to run on Huggingface [here](https://huggingface.co/mod
4141

4242
```bash
4343
# Pull a model directly from HuggingFace (with optional tag)
44-
# Downloads to llama.cpp cache using an ephemeral server
44+
# Downloads to HuggingFace cache using an ephemeral server
4545
harbor pull microsoft/Phi-3.5-mini-instruct-gguf
4646
harbor pull microsoft/Phi-3.5-mini-instruct-gguf:Q4_K_M
4747
```
4848

49-
This method automatically downloads the model to llama.cpp's cache. The model will be available for use immediately.
49+
This method automatically downloads the model to the HuggingFace cache. The model will be available for use immediately.
5050

5151
When `llamacpp` is running, you can check which models it detects in the cache with:
5252

@@ -62,7 +62,7 @@ harbor llamacpp models
6262
# Quick lookup for the models
6363
harbor hf find gguf
6464

65-
# 1. With llama.cpp own cache:
65+
# 1. With HuggingFace cache (default):
6666
#
6767
# - Set the model to run, will be downloaded when llamacpp starts
6868
# Accepts a full URL to the GGUF file (from Browser address bar)
@@ -99,7 +99,7 @@ harbor llamacpp gguf /app/models/hub/models--av-codes--Trinity-2-Codestral-22B-Q
9999
> [!NOTE]
100100
> Please, note that this procedure doesn't download the model. If model is not found in the cache, it will be downloaded on the next start of `llamacpp` service.
101101
102-
Downloaded models are stored in the global `llama.cpp` cache on your local machine (same as native version uses). The server can only run one model at a time and must be restarted to switch models.
102+
Downloaded models are stored in the HuggingFace cache (`~/.cache/huggingface`) on your local machine. The server can only run one model at a time and must be restarted to switch models.
103103

104104
#### Multiple models (router mode)
105105

@@ -126,7 +126,7 @@ HARBOR_LLAMACPP_MODEL_SPECIFIER=""
126126

127127
**Model sources (official docs → Harbor paths)**
128128

129-
- **Cache (default):** llama.cpp uses its cache to discover models. In Harbor this is mounted at `/root/.cache/llama.cpp` from `HARBOR_LLAMACPP_CACHE`.
129+
- **Cache (default):** llama.cpp uses the HuggingFace cache to discover models. In Harbor this is mounted at `/root/.cache/huggingface` from `HARBOR_HF_CACHE`.
130130
- **Models directory:** place GGUFs under `./llamacpp/data/models` and point the router to `/app/data/models`.
131131
- **Preset file:** place an INI file at `./llamacpp/data/models.ini` and point the router to `/app/data/models.ini`.
132132

@@ -198,7 +198,7 @@ harbor defaults rm llamacpp
198198
Following options are available via [`harbor config`](./3.-Harbor-CLI-Reference#harbor-config):
199199

200200
```bash
201-
# Location of the llama.cpp own cache, either global
201+
# Legacy llama.cpp cache path (models are now stored in HF cache)
202202
# or relative to $(harbor home)
203203
LLAMACPP_CACHE ~/.cache/llama.cpp
204204

harbor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5107,7 +5107,7 @@ run_modularmax_command() {
51075107
# ========================================================================
51085108

51095109
# Globals
5110-
version="0.4.5"
5110+
version="0.4.6"
51115111
harbor_repo_url="https://github.com/av/harbor.git"
51125112
harbor_release_url="https://api.github.com/repos/av/harbor/releases/latest"
51135113
delimiter="|"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@avcodes/harbor",
3-
"version": "0.4.5",
3+
"version": "0.4.6",
44
"description": "Effortlessly run LLM backends, APIs, frontends, and services with one command.",
55
"private": false,
66
"author": "av <av@av.codes> (https://av.codes)",

promptfoo/README.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
### [Promptfoo](https://github.com/promptfoo/promptfoo)
2+
3+
> Handle: `promptfoo`<br/>
4+
> URL: [http://localhost:34233](http://localhost:34233)<br/>
5+
6+
![Promptfoo example screenshot](../docs/promptfoo.png)
7+
8+
[![npm](https://img.shields.io/npm/v/promptfoo)](https://npmjs.com/package/promptfoo)
9+
[![npm](https://img.shields.io/npm/dm/promptfoo)](https://npmjs.com/package/promptfoo)
10+
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/typpo/promptfoo/main.yml)](https://github.com/promptfoo/promptfoo/actions/workflows/main.yml)
11+
![MIT license](https://img.shields.io/github/license/promptfoo/promptfoo)
12+
[![Discord](https://github.com/user-attachments/assets/2092591a-ccc5-42a7-aeb6-24a2808950fd)](https://discord.gg/gHPS9jjfbs)
13+
14+
`promptfoo` is a tool for testing, evaluating, and red-teaming LLM apps.
15+
16+
With promptfoo, you can:
17+
18+
- **Build reliable prompts, models, and RAGs** with benchmarks specific to your use-case
19+
- **Secure your apps** with automated [red teaming](https://www.promptfoo.dev/docs/red-team/) and pentesting
20+
- **Speed up evaluations** with caching, concurrency, and live reloading
21+
- **Score outputs automatically** by defining [metrics](https://www.promptfoo.dev/docs/configuration/expected-outputs)
22+
- Use as a [CLI](https://www.promptfoo.dev/docs/usage/command-line), [library](https://www.promptfoo.dev/docs/usage/node-package), or in [CI/CD](https://www.promptfoo.dev/docs/integrations/github-action)
23+
- Use OpenAI, Anthropic, Azure, Google, HuggingFace, open-source models like Llama, or integrate custom API providers for [any LLM API](https://www.promptfoo.dev/docs/providers)
24+
25+
#### Starting
26+
27+
```bash
28+
# [Optional] Pre-pull the image
29+
harbor pull promptfoo
30+
```
31+
32+
You'll be running Promptfoo CLI most of the time, it's available as:
33+
34+
```bash
35+
# Full name
36+
harbor promptfoo --help
37+
38+
# Alias
39+
harbor pf --help
40+
```
41+
42+
Whenever the CLI is called, it'll also automatically start local Promptfoo backend.
43+
44+
```bash
45+
# Run a CLI command
46+
harbor pf --help
47+
48+
# Promptfoo backend started
49+
harbor ps # harbor.promptfoo
50+
```
51+
52+
Promptfoo backend serves all recorded results in the web UI:
53+
54+
```bash
55+
# Open the web UI
56+
harbor open promptfoo
57+
harbor promptfoo view
58+
harbor pf o
59+
```
60+
61+
#### Usage
62+
63+
Most of the time, your workflow will be centered around creating prompts, assets, writing an eval config, running it and then viewing the results.
64+
65+
Harbor will run `pf` CLI from where you call Harbor CLI, so you can use it from any folder on your machine.
66+
67+
```bash
68+
# Ensure a dedicated folder for the eval
69+
cd /path/to/your/eval
70+
71+
# Init the eval (here)
72+
harbor pf init
73+
74+
# Edit the configuration, prompts as needed
75+
# Run the eval
76+
harbor pf eval
77+
78+
# View the results
79+
harbor pf view
80+
```
81+
82+
> [!NOTE]
83+
> If you're seeing any kind of file system permission errors you'll need to ensure that files written from within a container are [accessible to your user](../docs/1.-Harbor-User-Guide#file-system-permissions).
84+
85+
#### Configuration
86+
87+
Harbor pre-configures `promptfoo` to run against `ollama` out of the box (must be started before `pf eval`). Any other providers can be configured via:
88+
89+
- env vars (see [`harbor env`](../docs/3.-Harbor-CLI-Reference#harbor-env))
90+
- directly in promptfooconfig files (see [Providers reference](https://www.promptfoo.dev/docs/providers/) in the official documentation)
91+
92+
```bash
93+
# For example, use vLLM API
94+
harbor env promptfoo OPENAI_BASE_URL $(harbor url -i vllm)
95+
```
96+
97+
Promptfoo is a very rich and extensive tool, we recommend reading through excellent [official documentation](https://www.promptfoo.dev/docs/intro) to get the most out of it.
98+
99+
Harbor comes with two (basic) built-in examples.
100+
101+
##### Promptfoo hello-world
102+
103+
```bash
104+
# Navigate to eval folder
105+
cd $(harbor home)/services/promptfoo/examples/hello-promptfoo
106+
107+
# Start ollama and pull the target model
108+
harbor up ollama
109+
harbor ollama pull llama3.1:8b
110+
111+
# Run the eval
112+
harbor pf eval
113+
114+
# View the results
115+
harbor pf view
116+
```
117+
118+
##### Promptfoo temp-test
119+
120+
![Promptfoo temp-test example screenshot](../docs/promptfoo-2.png)
121+
122+
Evaluate a model across a range of temperatures to see if there's a sweet spot for a given prompt.
123+
124+
```bash
125+
# Navigate to eval folder
126+
cd $(harbor home)/services/promptfoo/examples/temp-test
127+
128+
# Start ollama and pull the target model
129+
harbor up ollama
130+
harbor ollama pull llama3.1:8b
131+
132+
# Run the eval
133+
harbor pf eval
134+
135+
# View the results
136+
harbor pf view
137+
```

0 commit comments

Comments
 (0)