Repository navigation
Add a workflow canvas for chaining models - #429
Conversation
|
Tested locally: the 440 dashboard tests and the build pass, and the API calls match #428. Two fixes before merge: "Stop and run" uses the state from when Record was clicked (recorder.onstop keeps that render's setAudio). Reproduced with a test that renders the Workflows page with a fake mic and inference server:
Calling setAudio through a ref fixes both (verified with the same test). Please also replace the silent if (running) return; in run() with a toast, so stopping during a run isn't silent. TTS autofill can pick the STT model: the TTS pattern matches bare speech, so deployments ["Speech Recognition", "Kokoro"] put both nodes on "Speech Recognition". Tightening both patterns and skipping deployments already given to another node fixes it. Default speaches names aren't affected. |
Stopping a recording called the setAudio from the render where Record was clicked, so a run in flight at that moment swallowed the recording and settings changed while recording were ignored. It now calls the current one, and a run started while another is going shows a toast instead of doing nothing. The TTS name match included 'speech', so an STT model named 'Speech Recognition' was picked for TTS too; the patterns are tighter and autofill no longer gives one deployment to two nodes. Signed-off-by: Priyanshu-u07 <connect.priyanshu8271@gmail.com>
|
Pushed the fixes for both bugs above. Looks good to merge now. |
Resolve conflicts with the InferiaAI#429 fix commit: keep his autofill as written; carry over main's recorder fix, run-in-progress toast and tighter STT/TTS name hints. Add readiness and deploy to the node card test's context. Signed-off-by: Priyanshu-u07 <connect.priyanshu8271@gmail.com>
Resolve conflicts with InferiaAI#429/InferiaAI#430: keep the setInput/inputs rename; carry over main's recorder fix and run-in-progress toast. Rename the node card test to setInput/inputs. Signed-off-by: Priyanshu-u07 <connect.priyanshu8271@gmail.com>
Adds a Workflows page to the dashboard (under Build, behind
deployment:listlike Sandbox). You drag nodes onto a canvas, connect them, pick a deployed model for each, and run the whole pipeline. Each node shows its status, time in ms and output.Nodes: audio input (record or upload), text input, speech to text, LLM (with a system prompt), text to speech, text output, audio output. Two built-in templates:
How it works:
src/lib/workflow/nodeKinds.tsis one registry table. Each node kind declares its input and output type (audioortext), its config fields and arunfunction, so adding a node type is one entry.engine.tsrejects bad connections (type mismatch, self loop, second input, cycle), runs nodes in topological order and stops at the first error.x-sandbox: true, the same as Sandbox. STT/TTS use/v1/audio/transcriptionsand/v1/audio/speechfrom Add speech-to-text and text-to-speech endpoints #428.Sandbox.tsxintouseReadyDeploymentsso both pages share it. Sandbox behaves the same.Needs #428 to run audio nodes (and for the model dropdowns to tell STT/TTS from LLMs).
Testing:
npm run buildpasses.npm run lintandtscalready fail on main (156 lint errors, 89 tsc lines). This adds none; the new files lint clean.Live latency per node (ticking while a node runs, then p50/p95 over recent runs, plus total and time to first audio):