Aleix Conchillo Flaqué
b03247f360
Rename BaseTask → BaseWorker and reserve "task" for asyncio
...
Replaces every "task" identifier that referred to the BaseTask
abstraction with "worker". Asyncio task plumbing (asyncio.Task,
BaseTaskManager, TaskManager, create_task, cancel_task, etc.) stays
untouched. Highlights:
- Classes: BaseTask → BaseWorker, PipelineTask → PipelineWorker,
LLMTask → LLMWorker, LLMContextTask → LLMContextWorker, TaskBus →
WorkerBus, TaskRegistry → WorkerRegistry, TaskActivationArgs →
WorkerActivationArgs, TaskReadyData → WorkerReadyData,
TaskRegistryEntry → WorkerRegistryEntry, TaskObserver →
WorkerObserver, all Bus*TaskMessage → Bus*WorkerMessage,
BusAddTaskMessage.task field → worker, BusWorkerRegistryMessage.tasks
field → workers.
- Methods/decorators: activate_task → activate_worker, deactivate_task
→ deactivate_worker, add_task → add_worker, watch_task →
watch_worker, @task_ready → @worker_ready, setup_pipeline_task hook
→ setup_pipeline_worker.
- Params/fields: FrameProcessorSetup.pipeline_task and
FunctionCallParams.pipeline_task → pipeline_worker. Parameter names
like task_name → worker_name; spawn/run accept worker:.
- Files: pipeline/base_task.py → base_worker.py, pipeline/task.py →
worker.py (plus a re-export shim at pipeline/task.py),
task_observer.py → worker_observer.py, task_ready_decorator.py →
worker_ready_decorator.py, pipecat.tasks → pipecat.workers,
llm_task.py → llm_worker.py, llm_context_task.py →
llm_context_worker.py, examples/multi-task → examples/multi-worker.
Back-compat:
- PipelineTask kept as a deprecated subclass of PipelineWorker that
warns on construction.
- pipecat.pipeline.task re-exports PipelineWorker/PipelineTask/etc. so
existing user imports keep working.
- FrameProcessor.pipeline_task kept as a deprecated property that
forwards to pipeline_worker.
Local variables in examples that hold a worker (task = PipelineTask(...))
are renamed to worker = PipelineWorker(...). Asyncio-task locals
(runner_task, etc.) are preserved.
2026-05-21 19:07:13 -07:00
Mark Backman
e719cbbe6d
Reorganize examples into topic-based subfolders
...
Move 304 examples from a flat numbered directory into 14 descriptive
subfolders: getting-started, services (speech + function-calling),
transcription, vision, realtime, persistent-context,
context-summarization, update-settings (stt/tts/llm), turn-management,
thinking-and-mcp, transports, video-avatar, video-processing, and
features.
Strip numbered prefixes from filenames (e.g. 07c-interruptible-deepgram.py
becomes services/speech/deepgram.py) since the folder context makes them
redundant. Keep numbered prefixes only in getting-started/ where ordering
matters.
Update eval script paths and README to match the new structure.
2026-03-31 13:12:24 -04:00