Skip to main content


Sinapsis
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 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.

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.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 1.0.2
File Size Uploaded Provenance Actions
sinapsis_chatbots_base-1.0.2.tar.gz 88.9 kB Without provenance Details for sinapsis_chatbots_base-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sinapsis-chatbots-base 1.0.2
File Interpreter ABI Platform Actions
sinapsis_chatbots_base-1.0.2-py3-none-any.whl Python 3 none any Details for sinapsis_chatbots_base-1.0.2-py3-none-any.whl

Total release size: 144.2 kB

Release files / sinapsis_chatbots_base-1.0.2.tar.gz

Download URL sinapsis_chatbots_base-1.0.2.tar.gz
Size 88.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8c02b72ea86c9f35a07fbc43ff80ba388acfb0edb27d4452f6be93f2ae0d4e04
BLAKE2b-256 checksum
How to use checksums
8631d89130a979cea99575b40f3b87d5418dce6bb44cef793ce917a7e1149d59
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.2-py3-none-any.whl

Download URL sinapsis_chatbots_base-1.0.2-py3-none-any.whl
Size 55.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d551d71a868ada6c94e81215833ab111a8f88f912f873e8d97161f29fb50fd6
BLAKE2b-256 checksum
How to use checksums
67fedcef22ede47f16b8468edcc249b2430770aab5d0f0b55501fd2668ad4e21
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.2

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.

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