Skip to main content



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] EndpointLLMCompletion and EndpointLLMCompletionWithMCP require the optional endpoint extra:

uv pip install sinapsis-chatbots-base[endpoint] --extra-index-url https://pypi.sinapsis.tech

all installs 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 LLMConversationPacket from 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 EndpointLLMCompletion for 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] EndpointLLMCompletionWithMCP is 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-names to 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)

Source distribution for sinapsis-chatbots-base 0.2.2
File Size Uploaded
sinapsis_chatbots_base-0.2.2.tar.gz 42.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sinapsis-chatbots-base 0.2.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.12

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page