File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Set up Go
16+ uses : actions/setup-go@v5
17+ with :
18+ go-version : ' 1.22'
19+
20+ - name : Download dependencies
21+ run : go mod download
22+
23+ - name : Build
24+ run : go build -v ./...
25+
26+ - name : Test
27+ run : go test -v ./...
28+
29+ lint :
30+ runs-on : ubuntu-latest
31+ steps :
32+ - uses : actions/checkout@v4
33+
34+ - name : Set up Go
35+ uses : actions/setup-go@v5
36+ with :
37+ go-version : ' 1.22'
38+
39+ - name : golangci-lint
40+ uses : golangci/golangci-lint-action@v4
41+ with :
42+ version : latest
Original file line number Diff line number Diff line change 1+ name : Docker
2+
3+ on :
4+ push :
5+ branches : [main]
6+ tags :
7+ - ' v*'
8+
9+ env :
10+ REGISTRY : ghcr.io
11+ IMAGE_NAME : ${{ github.repository }}
12+
13+ jobs :
14+ build-and-push :
15+ runs-on : ubuntu-latest
16+ permissions :
17+ contents : read
18+ packages : write
19+
20+ steps :
21+ - uses : actions/checkout@v4
22+
23+ - name : Log in to Container Registry
24+ uses : docker/login-action@v3
25+ with :
26+ registry : ${{ env.REGISTRY }}
27+ username : ${{ github.actor }}
28+ password : ${{ secrets.GITHUB_TOKEN }}
29+
30+ - name : Extract metadata
31+ id : meta
32+ uses : docker/metadata-action@v5
33+ with :
34+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
35+ tags : |
36+ type=ref,event=branch
37+ type=semver,pattern={{version}}
38+ type=semver,pattern={{major}}.{{minor}}
39+ type=sha
40+
41+ - name : Build and push
42+ uses : docker/build-push-action@v5
43+ with :
44+ context : .
45+ push : true
46+ tags : ${{ steps.meta.outputs.tags }}
47+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ release :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+ with :
17+ fetch-depth : 0
18+
19+ - name : Set up Go
20+ uses : actions/setup-go@v5
21+ with :
22+ go-version : ' 1.22'
23+
24+ - name : Run GoReleaser
25+ uses : goreleaser/goreleaser-action@v5
26+ with :
27+ distribution : goreleaser
28+ version : latest
29+ args : release --clean
30+ env :
31+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ version : 2
2+
3+ before :
4+ hooks :
5+ - go mod tidy
6+
7+ builds :
8+ - env :
9+ - CGO_ENABLED=0
10+ goos :
11+ - linux
12+ - darwin
13+ - windows
14+ goarch :
15+ - amd64
16+ - arm64
17+ binary : distill
18+ ldflags :
19+ - -s -w -X main.version={{.Version}}
20+
21+ archives :
22+ - format : tar.gz
23+ name_template : >-
24+ {{ .ProjectName }}_
25+ {{- .Version }}_
26+ {{- .Os }}_
27+ {{- .Arch }}
28+ format_overrides :
29+ - goos : windows
30+ format : zip
31+
32+ checksum :
33+ name_template : ' checksums.txt'
34+
35+ snapshot :
36+ version_template : " {{ incpatch .Version }}-next"
37+
38+ changelog :
39+ sort : asc
40+ filters :
41+ exclude :
42+ - ' ^docs:'
43+ - ' ^test:'
44+ - ' ^chore:'
Original file line number Diff line number Diff line change 11# Distill
22
3+ [ ![ CI] ( https://github.com/Siddhant-K-code/distill/actions/workflows/ci.yml/badge.svg )] ( https://github.com/Siddhant-K-code/distill/actions/workflows/ci.yml )
4+ [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/Siddhant-K-code/distill )] ( https://goreportcard.com/report/github.com/Siddhant-K-code/distill )
5+ [ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
6+
37A reliability layer for LLM context. Deterministic deduplication that removes redundancy before it reaches your model.
48
59```
@@ -32,11 +36,38 @@ Query → Over-fetch (50) → Cluster → Select → MMR Re-rank (8) → LLM
3236
3337## Installation
3438
39+ ### Binary (Recommended)
40+
41+ Download from [ GitHub Releases] ( https://github.com/Siddhant-K-code/distill/releases ) :
42+
43+ ``` bash
44+ # macOS (Apple Silicon)
45+ curl -L https://github.com/Siddhant-K-code/distill/releases/latest/download/distill_Darwin_arm64.tar.gz | tar xz
46+
47+ # macOS (Intel)
48+ curl -L https://github.com/Siddhant-K-code/distill/releases/latest/download/distill_Darwin_amd64.tar.gz | tar xz
49+
50+ # Linux (amd64)
51+ curl -L https://github.com/Siddhant-K-code/distill/releases/latest/download/distill_Linux_amd64.tar.gz | tar xz
52+
53+ # Move to PATH
54+ sudo mv distill /usr/local/bin/
55+ ```
56+
57+ ### Go Install
58+
3559``` bash
3660go install github.com/Siddhant-K-code/distill@latest
3761```
3862
39- Or build from source:
63+ ### Docker
64+
65+ ``` bash
66+ docker pull ghcr.io/siddhant-k-code/distill:latest
67+ docker run -p 8080:8080 -e OPENAI_API_KEY=your-key ghcr.io/siddhant-k-code/distill
68+ ```
69+
70+ ### Build from Source
4071
4172``` bash
4273git clone https://github.com/Siddhant-K-code/distill.git
You can’t perform that action at this time.
0 commit comments