Sinapsis Chatbots-Base
Shared building blocks for LLM conversations, message construction and streaming.
Overview
sinapsis-chatbots-base — Sinapsis templates for shared chatbot foundations.
The chatbots foundation separates the mechanics of conversation formatting, contextualisation, and stream handling from a particular model provider. This makes it easier to switch between endpoint-hosted and locally running models without rewriting surrounding Templates.
Where it fits
The package includes endpoint-oriented and multi-modal paths; install the optional endpoint or torch dependencies only when your chatbot stack uses them. A base Template is not a complete hosted model service.
Installation
Requires Python 3.13 or later, as declared in this package’s manifest. Install the base distribution using your preferred package manager:
uv pip install sinapsis-chatbots-base
# or
pip install sinapsis-chatbots-base
Optional features and dependencies
The base installation includes the dependencies required by the package. The following extras are declared in this package’s pyproject.toml; install only those needed by your workflow. They are standard Python optional dependencies, not separate execution profiles.
| Extra | Adds / when to select it |
|---|---|
torch |
PyTorch-backed operations. Dependencies: torch |
endpoint |
Endpoint-hosted model integration. Dependencies: openai |
all |
Bundle declared by this package; its manifest includes torch, endpoint. |
For example:
uv pip install "sinapsis-chatbots-base[torch]"
The manifest also defines development-only dependency groups: dev (ruff, pre-commit). These support source development and testing and are not runtime extras.
🚀 Features
Templates Supported
- LLMConversationInput: Creates an
LLMConversationPacketfrom a prompt, system prompt, and packet metadata. - QueryContextualizeFromFile: Builds packet contexts from files or documents already loaded into the container.
- EndpointLLMCompletion: Sends chat requests to OpenAI-compatible endpoints such as OpenAI, Ollama, llama.cpp server, vLLM server, or compatible hosted APIs.
- EndpointLLMCompletionWithMCP: Adds MCP tool support on top of
EndpointLLMCompletionfor OpenAI-compatible endpoints. - EndpointLLMStreamingCompletion: Streams chat-completion chunks from OpenAI-compatible endpoints and emits partial packet updates.
- EndpointLLMMultiModal: Sends text + image user turns to OpenAI-compatible multimodal endpoints.
Example Agent
Export your api key or set to an invalid string if not set:
export LLM_API_KEY="not-valid"
The following is adapted directly from the package’s shipped streaming.yaml configuration. Save it as my_chatbots_base_agent.yaml. The example may require model checkpoints, input files, additional Template packages, or provider credentials as described in its configuration.
agent:
name: my_chatbots_base_agent
description: Demonstrates streaming text generation with a vLLM OpenAI-compatible endpoint.
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: LLMConversationInput
class_name: LLMConversationInput
template_input: InputTemplate
attributes:
prompt: "Give three short tips for staying organized during a busy week."
system_prompt: "You are a helpful assistant."
- template_name: EndpointLLMStreamingCompletion
class_name: EndpointLLMStreamingCompletion
template_input: LLMConversationInput
attributes:
init_args:
base_url: "http://127.0.0.1:8080/v1"
llm_model_name: "Qwen/Qwen3-4B-Thinking-2507"
completion_args:
max_tokens: 1024
temperature: 0.7
top_p: 0.8
sinx-venv jobs run my_chatbots_base_agent.yaml
More configurations: llamacpp_server.yaml, gemini_api.yaml, openai_api.yaml, ollama_chat.yaml, vllm_server.yaml, streaming.yaml, multimodal.yaml, bedrock_mantle_openai.yaml, ollama_with_mcp.yaml, structured_outputs.yaml.
Documentation
License
Sinapsis open-source components are available under your choice of the MIT License or the Apache License 2.0, unless otherwise noted.
Metadata
Release files for sinapsis-chatbots-base 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sinapsis_chatbots_base-1.0.1.tar.gz | 88.8 kB | Without provenance | Details for sinapsis_chatbots_base-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sinapsis_chatbots_base-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for sinapsis_chatbots_base-1.0.1-py3-none-any.whl |
Total release size: 144.1 kB
Release files / sinapsis_chatbots_base-1.0.1.tar.gz
| Download URL | sinapsis_chatbots_base-1.0.1.tar.gz |
|---|---|
| Size | 88.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
052235937f909d37f6b74e62a6d1d7ead9fef4a207886d6e4a064c29abdc0ada
|
|
BLAKE2b-256 checksum How to use checksums |
7a3b3b71d05230a390e55b2db51418831864b7a48873415cfe7dd3247266d5e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / sinapsis_chatbots_base-1.0.1-py3-none-any.whl
| Download URL | sinapsis_chatbots_base-1.0.1-py3-none-any.whl |
|---|---|
| Size | 55.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
05aabea45486784fe79d1e67f216ff9f49105dca81c244b96ec9d908a0658689
|
|
BLAKE2b-256 checksum How to use checksums |
68fb23cc9b78414794477bf2bc1f4f9644cde5917510ff34f350ec234f2c3c17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for sinapsis-chatbots-base 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.