Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
run: uv sync
- name: Lint
run: |
uv run ruff check video-search/ chat-agent/ tests/
uv run ruff format video-search/ chat-agent/ tests/ --check
uv run ruff check video-search/ chat-agent/ openai-360/ tests/
uv run ruff format video-search/ chat-agent/ openai-360/ tests/ --check
- name: Test
run: uv run python -m pytest tests/ -v --tb=short

Expand All @@ -64,6 +64,7 @@ jobs:
run: |
cd chat-agent && uv sync
cd ../video-search && uv sync
cd ../openai-360 && uv sync
- name: Run schema import smoke tests
run: uv run python -m pytest tests/test_schema.py -v --run-slow --tb=short
- name: Apply each schema to a real catalog
Expand All @@ -72,10 +73,11 @@ jobs:
# `import app` proves the file parses and the models construct. It does not prove the
# reconciler accepts them: a bad base=, a duplicate index name or an unsupported column
# property imports cleanly and fails at update. This catches that, and needs no API key.
for app in chat-agent video-search; do
for app in chat-agent video-search openai-360; do
case "$app" in
chat-agent) target=agent ;;
video-search) target=videointel ;;
openai-360) target=claims ;;
esac
echo "=== $app -> $target ==="
home="$RUNNER_TEMP/pxt-schema-$app"
Expand Down
9 changes: 5 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ Video: `uvx pixeltable-new myapp --video`, then TARGET `videointel`.
```
video-search/ Frames, CLIP, images. TARGET videointel. uvx --video
chat-agent/ Knowledge, memory, LLM. TARGET agent. uvx default
openai-360/ Photo + voice claims, six OpenAI calls. TARGET claims. Clone only
tests/ Structure and config. Schema smoke: --run-slow.
```

Do not add `templates/`, `backend/`, `serving/`, `batch/`, or a PaaS `deploy/` zoo.
New verticals: edit `app.py` or add a folder next to these two with the same apply path.
New verticals: edit `app.py` or add a folder next to these with the same apply path.

## Extend an app

Expand All @@ -66,15 +67,15 @@ Similarity uses `string=`: `col.similarity(string=query)`. In `@pxt.query`, alia

```bash
uv sync
uv run ruff check video-search/ chat-agent/ tests/
uv run ruff format video-search/ chat-agent/ tests/ --check
uv run ruff check video-search/ chat-agent/ openai-360/ tests/
uv run ruff format video-search/ chat-agent/ openai-360/ tests/ --check
uv run python -m pytest tests/ -v
```

Schema import smoke (needs Pixeltable in each app venv):

```bash
cd chat-agent && uv sync && cd ../video-search && uv sync && cd ..
cd chat-agent && uv sync && cd ../video-search && uv sync && cd ../openai-360 && uv sync && cd ..
uv run python -m pytest tests/test_schema.py -v --run-slow
```

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ older SDKs do not ship, and SDK 1.x rejects `temperature`/`top_p`/`top_k`.

```bash
uv sync
uv run ruff check video-search/ chat-agent/ tests/
uv run ruff format video-search/ chat-agent/ tests/ --check
uv run ruff check video-search/ chat-agent/ openai-360/ tests/
uv run ruff format video-search/ chat-agent/ openai-360/ tests/ --check
uv run python -m pytest tests/ -v
```

Expand Down
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/pixeltable/pixeltable-starter-kit)

Two apps. Each is one application file (`app.py`).
Three apps. Each is one application file (`app.py`).
Declare, Experiment, Serve: `pxt schema update`, then `pxt service update`, then insert, `/ask`, or `pxt dashboard`.

**Export your API keys before the first `pxt` command** -- the service inherits the daemon's environment. Export a
Expand Down Expand Up @@ -69,6 +69,21 @@ curl -s -X POST http://127.0.0.1:<port>/api/ingest/image \

Video ingest is a background job. Poll `job_url` from the insert response.

## OpenAI 360

A warranty claims desk. A claim arrives as a photo and a voice note, and six OpenAI endpoints in one table
transcribe it, screen it, ask the Decisions API about it, and draft and speak a reply for the claims it approves.

```bash
export OPENAI_API_KEY=sk-... # before the first pxt command
cd openai-360 && uv sync
uv run pxt schema update app.py claims
uv run python seed.py # four generated demo claims
uv run pxt service update app.py claims
```

What runs, and how to look inside: [openai-360/README.md](openai-360/README.md).

Already have FastAPI: copy `app.py` under a project root (`pixeltable.toml`, or run `pxt init`), apply it, then
`app.include_router(api)` on the router in `app.py`.

Expand Down Expand Up @@ -98,7 +113,7 @@ Drift check and exit codes: [AGENTS.md](AGENTS.md).
Layout and tests: [AGENTS.md](AGENTS.md).
Skill: `npx skills add pixeltable/pixeltable-skill`.

Python 3.11+. `uv sync` installs `pixeltable[serve]>=0.7.16`.
Python 3.11+. `uv sync` installs `pixeltable[serve]>=0.7.23`.

## Resources

Expand Down
2 changes: 1 addition & 1 deletion chat-agent/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "chat-agent"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"pixeltable[serve]>=0.7.16",
"pixeltable[serve]>=0.7.23",
"anthropic>=1.3",
"psycopg[binary]>=3.1",
"sentence-transformers>=5.6.0",
Expand Down
Loading
Loading