Sinapsis Chatbots Base
Sinapsis templates for chatbot inputs, contextualization, and endpoint-backed completions.
🐍 Installation • 🚀 Features • 📚 Usage example • 📙 Documentation • 🔍 License
The sinapsis-chatbots-base package provides the shared chatbot foundation. It includes the base abstractions for LLM templates together with the core templates for building LLMConversationPacket inputs, adding document context from preloaded data, and sending chat requests to OpenAI-compatible HTTP endpoints.
🐍 Installation
Install using your preferred package manager. We strongly recommend using uv.
Install the base package:
uv pip install sinapsis-chatbots-base --extra-index-url https://pypi.sinapsis.tech
Or with raw pip:
pip install sinapsis-chatbots-base --extra-index-url https://pypi.sinapsis.tech
[!IMPORTANT]
EndpointLLMCompletionandEndpointLLMCompletionWithMCPrequire the optionalendpointextra:uv pip install sinapsis-chatbots-base[endpoint] --extra-index-url https://pypi.sinapsis.tech
allinstalls every optional dependency exposed by the package:uv pip install sinapsis-chatbots-base[all] --extra-index-url https://pypi.sinapsis.tech
🚀 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.
[!NOTE]
EndpointLLMCompletionWithMCPis currently validated for llama.cpp served Qwen 3.5 models and other OpenAI-compatible endpoints may also work depending on tool-calling behavior.
[!TIP] Use CLI command
sinapsis info --all-template-namesto show a list with all the available Template names installed with Sinapsis Chatbots Base.
📚 Usage example
The following agent builds an LLMConversationPacket and sends it to an OpenAI-compatible endpoint.
Config
agent:
name: openai_api_agent
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: EndpointLLMCompletion
class_name: EndpointLLMCompletion
template_input: LLMConversationInput
attributes:
init_args:
base_url: "https://api.openai.com/v1"
llm_model_name: "gpt-4o-mini"
completion_args:
max_tokens: 2048
📙 Documentation
Documentation for this and other sinapsis packages is available on the sinapsis website
Tutorials for different projects within sinapsis are available at sinapsis tutorials page
🔍 License
This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the LICENSE file.
For commercial use, please refer to our official Sinapsis website for information on obtaining a commercial license.
Metadata
Release files for sinapsis-chatbots-base 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sinapsis_chatbots_base-0.2.2.tar.gz | 42.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sinapsis_chatbots_base-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 95.4 kB
Release files / sinapsis_chatbots_base-0.2.2.tar.gz
| Download URL | sinapsis_chatbots_base-0.2.2.tar.gz |
|---|---|
| Size | 42.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf6e7f371a2890ee90b8cdd666882c45d7491b7397aa4bdd2d46bef77b72bb04
|
|
BLAKE2b-256 checksum How to use checksums |
48190897bcd4e6fb5de3af1b78ec4b83a0cb655bfea9e58b4ab21590cbf6b1c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.16
|
Release files / sinapsis_chatbots_base-0.2.2-py3-none-any.whl
| Download URL | sinapsis_chatbots_base-0.2.2-py3-none-any.whl |
|---|---|
| Size | 52.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e9c67007917dbcef039044e58994ca7eb179f31399e27ce5a6f8dbf9851aa95
|
|
BLAKE2b-256 checksum How to use checksums |
458d3d0ff9f96d82cfdab59621393549d94c542eb681ec44fd697a2f13a0a49d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.16
|