Skip to content

feat: AI transform executor with Ollama and OpenAI-compatible backend support#276

Merged
szmyty merged 3 commits into
mainfrom
copilot/implement-ai-transform-executor
Apr 10, 2026
Merged

feat: AI transform executor with Ollama and OpenAI-compatible backend support#276
szmyty merged 3 commits into
mainfrom
copilot/implement-ai-transform-executor

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

Adds AI-powered transforms as first-class pipeline nodes, enabling use cases like markdown → Fountain screenplay via local or remote LLMs.

New: AiTransform (src/transforms/ai.rs)

  • AiBackend::Ollama — POSTs to <endpoint>/api/generate (stream: false)
  • AiBackend::OpenAi — POSTs to <endpoint>/v1/chat/completions
  • Prompt templates with {input} placeholder substitution
  • Optional Authorization: Bearer header for authenticated APIs
  • Optional artifact_path to write output to a file after each call
  • Error messages include raw response body for debuggability

Extended YAML schema (yaml_loader.rs)

New fields on YamlTransformDef: ai, model, prompt, endpoint, api_key, artifact_path. Dispatch priority: ai > plugin > program.

transforms:
  - name: md-to-screenplay
    ai: ollama
    model: llava
    prompt: "Convert this markdown to Fountain screenplay: {input}"
    endpoint: http://localhost:11434
    artifact_path: output/screenplay.fountain
    from: markdown
    to: fountain
    cost: 2.0
    quality: 0.85

Other

  • Format::Fountain added to the format graph for screenplay output
  • ureq = { version = "2", features = ["json"] } added for blocking HTTP (no async runtime required)

Copilot AI linked an issue Apr 10, 2026 that may be closed by this pull request
5 tasks
Copilot AI changed the title [WIP] Implement AI transform executor with Ollama/OpenAI support feat: AI transform executor with Ollama and OpenAI-compatible backend support Apr 10, 2026
Copilot AI requested a review from szmyty April 10, 2026 02:18
@szmyty szmyty marked this pull request as ready for review April 10, 2026 07:01
@szmyty szmyty merged commit 9080e85 into main Apr 10, 2026
@devactivity-app
Copy link
Copy Markdown

Pull Request Summary by devActivity

Metrics

Cycle Time: 4h 55m Coding Time: < 1 min Pickup Time: 4h 42m Review Time: < 1 min

Achievements

@szmyty szmyty deleted the copilot/implement-ai-transform-executor branch April 10, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🤖 Implement AI transform executor (Ollama/OpenAI support)

2 participants