Skip to content

Commit 659034b

Browse files
authored
Merge pull request #643 from Kiln-AI/main
Docs update for v0.21 release
2 parents 0c11819 + 5352ed5 commit 659034b

File tree

270 files changed

+46676
-3676
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

270 files changed

+46676
-3676
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Check API Bindings
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
check-api-bindings:
8+
name: Check API Schema Bindings
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v3
16+
with:
17+
enable-cache: true
18+
19+
- name: Set up Python
20+
run: uv python install
21+
22+
- name: Install the project
23+
run: uv sync --all-extras --dev
24+
25+
- name: Set up Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: "24"
29+
cache: "npm"
30+
cache-dependency-path: app/web_ui/package-lock.json
31+
32+
- name: Install Node.js dependencies
33+
run: npm ci
34+
working-directory: app/web_ui
35+
36+
- name: Mock Studio Web UI
37+
run: mkdir -p ./app/web_ui/build && echo "test" > ./app/web_ui/build/index.html
38+
39+
- name: Check API schema bindings
40+
run: |
41+
# Start dev server in background
42+
uv run python -m app.desktop.dev_server &
43+
DEV_SERVER_PID=$!
44+
45+
# Wait for server to be ready
46+
echo "Waiting for dev server to start..."
47+
for i in {1..30}; do
48+
if curl -s -f http://localhost:8757/openapi.json > /dev/null 2>&1; then
49+
echo "Dev server is ready"
50+
break
51+
fi
52+
if [ $i -eq 30 ]; then
53+
echo "Dev server failed to start within 30 seconds"
54+
kill $DEV_SERVER_PID || true
55+
exit 1
56+
fi
57+
sleep 1
58+
done
59+
60+
# Change to the correct directory and run the schema check
61+
cd app/web_ui/src/lib
62+
./check_schema.sh
63+
64+
# Stop dev server
65+
kill $DEV_SERVER_PID || true
66+
# Wait a moment for graceful shutdown
67+
sleep 2
68+
# Force kill if still running
69+
kill -9 $DEV_SERVER_PID 2>/dev/null || true

.github/workflows/windows_release_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
timestamp-digest: SHA256
5050

5151
- name: Build Windows Installer
52-
uses: Minionguyjpro/Inno-Setup-Action@v1.2.5
52+
uses: Minionguyjpro/Inno-Setup-Action@v1.2.7
5353
with:
5454
path: ./app/desktop/WinInnoSetup.iss
5555

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ __pycache__/
88
.coverage
99
**/.venv
1010
**/*.egg-info
11+
node_modules/
1112

1213
libs/core/docs
1314
libs/core/build

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
- 📊 [**Evals**](https://docs.kiln.tech/docs/evaluations): Evaluate the quality of your models/tasks using state of the art evaluators.
4040
- 🎛️ [**Fine Tuning**](https://docs.kiln.tech/docs/fine-tuning-guide): Zero-code fine-tuning for Llama, GPT-4o, and more. Automatic serverless deployment of models.
4141
- 🤖 [**Synthetic Data Generation**](https://docs.kiln.tech/docs/synthetic-data-generation): Generate eval datasets or fine-tuning data with our interactive visual tooling.
42+
- 🛠 [**Tools & MCP**](https://docs.kiln.tech/docs/tools-and-mcp): Connect powerful tools to your Kiln tasks
4243
- 🧠 [**Reasoning Models**](https://docs.kiln.tech/docs/guide-train-a-reasoning-model): Train or distill your own custom reasoning models.
4344
- 📝 [**Prompt Generation**](https://docs.kiln.tech/docs/prompts): Automatically generate prompts including chain-of-thought, few-shot, and multi-shot, and more.
4445
- 🌐 [**Comprehensive Model Support**](https://kiln.tech/model_library): Skip the guesswork — we've tested over 100 models' capabilities. Use any model via Ollama, OpenAI, OpenRouter, Fireworks, Groq, AWS, any OpenAI compatible API, and more.

app/desktop/WinInnoSetup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#define MyAppPath "build\dist\Kiln"
55
#define MyAppName "Kiln"
6-
#define MyAppVersion "0.20.0"
6+
#define MyAppVersion "0.20.1"
77
#define MyAppPublisher "Chesterfield Laboratories Inc"
88
#define MyAppURL "https://kiln.tech"
99
#define MyAppExeName "Kiln.exe"

app/desktop/desktop.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import tkinter as tk
1111
import webbrowser
1212

13+
from kiln_ai.utils.config import Config
1314
from PIL import Image
1415

1516
# Unused, but needed for pyinstaller to not miss this import
@@ -19,6 +20,12 @@
1920
from app.desktop.custom_tray import KilnMenuItem, KilnTray
2021
from app.desktop.desktop_server import ThreadedServer, server_config
2122

23+
# Set writeable cache directories as soon as we start
24+
os.environ["LLAMA_INDEX_CACHE_DIR"] = os.path.join(
25+
Config.settings_dir(), "cache", "llama_index_cache"
26+
)
27+
os.environ["NLTK_DATA"] = os.path.join(Config.settings_dir(), "cache", "nltk_data")
28+
2229

2330
class DesktopApp:
2431
def __init__(self, port: int = 8757):

app/desktop/studio_server/data_gen_api.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,21 @@ async def generate_samples(
155155

156156
@app.post("/api/projects/{project_id}/tasks/{task_id}/save_sample")
157157
async def save_sample(
158+
project_id: str,
159+
task_id: str,
160+
task_run: TaskRun,
161+
) -> TaskRun:
162+
"""
163+
Save a sample generated by the generate_sample endpoint.
164+
"""
165+
task = task_from_id(project_id, task_id)
166+
# Set parent to task to ensure the correct path is used
167+
task_run.parent = task
168+
task_run.save_to_file()
169+
return task_run
170+
171+
@app.post("/api/projects/{project_id}/tasks/{task_id}/generate_sample")
172+
async def generate_sample(
158173
project_id: str,
159174
task_id: str,
160175
sample: DataGenSaveSamplesApiInput,
@@ -212,7 +227,6 @@ async def save_sample(
212227
tags.extend(sample.tags)
213228
run.tags = tags
214229

215-
run.save_to_file()
216230
return run
217231

218232

0 commit comments

Comments
 (0)