oterm/tests
Yiorgis Gozadinos f8c6edc2b5
Add the speak capability
Registers a "speak" capability that reads responses aloud through piper as it
streams, backed by pydantic-ai-tts and installed with the oterm[speak] extra.
The entry appears in the tool selector only when the package is importable, so
a base install pulls neither onnxruntime nor a voice model.

The extra carries a python_version >= '3.11' marker because pydantic-ai-tts
requires 3.11 while oterm supports 3.10; without it the extra cannot resolve.
On 3.10 the package is absent and the capability is simply not registered.

The factory is memoised: capabilities are built once per chat and every Speaks
owns worker threads the factory contract gives no place to close. It also sets
ORT_DISABLE_TELEMETRY before the import, which is where onnxruntime reads it,
leaving an explicit setting alone.

pydantic-ai-tts is MIT but pulls piper-tts, which is GPL-3.0-or-later, into
the environment of anyone installing the extra.
2026-09-01 18:35:43 +03:00
..
agent Qualify MCP tool names by server 2026-07-31 15:46:30 +03:00
app Add a keybinding for copying the last message 2026-07-31 17:48:44 +03:00
data Support images in ollama api, in our own OllamaLLM 2023-12-18 14:18:12 +01:00
modals Sort imports in chat_edit; cover blank-line skip in Modelfile parser 2026-06-30 11:13:22 +03:00
tools Add the speak capability 2026-09-01 18:35:43 +03:00
unit Rely on pydantic to determine DeepSeek thinking capability 2026-08-01 08:43:07 -05:00
widgets Add a keybinding for copying the last message 2026-07-31 17:48:44 +03:00
__init__.py Migrate from ollama-python to pydantic-ai 2026-02-25 16:44:31 +02:00
_helpers.py Label attached images with their sniffed media type 2026-07-25 10:51:10 +03:00
_stream_helpers.py Drop pydantic-ai private import in test helper, type MCP log handler against public alias 2026-05-22 12:23:19 +03:00
conftest.py Drop dead VCR scaffolding and tighten MessageModel.role to user/assistant 2026-04-26 21:26:00 +03:00