Skip to main content

Assistant Base Extension

Use this library to add extension to https://github.com/samuelint/ai-assistant.

How to use

  1. Add the library to your project
poetry add base-assistant-extension
  1. At the base of your project export a class Called Extension
# extension.py
from langchain_core.language_models import BaseChatModel
from langchain_core.runnables import Runnable
from base_assistant_extension.base_extension import (
    BaseExtension,
)
from langchain_core.prompts import PromptTemplate


class Extension(BaseExtension):
    def name(self) -> str:
        return "joker"

    def description(self) -> str:
        return "Tell jokes."

    def create_runnable(self, llm: BaseChatModel) -> Runnable:
        prompt = PromptTemplate.from_template(
            "You tell jokes. No matter the question. You have to tell a joke."
            "{messages}"
        )

        return prompt | llm
# __init__.py
from .extension import Extension

__all__ = ["Extension"]
  1. Build
poetry build

will produce a .whl file. Which is the extension to be used.

Metadata

Release files for base-assistant-extension 0.6.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for base-assistant-extension 0.6.6
File Size Uploaded Provenance
base_assistant_extension-0.6.6.tar.gz 3.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for base-assistant-extension 0.6.6
File Interpreter ABI Platform
base_assistant_extension-0.6.6-py3-none-any.whl Python 3 none any Details

Total release size: 8.9 kB

Release files / base_assistant_extension-0.6.6.tar.gz

Download URL base_assistant_extension-0.6.6.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
aa9709d1a7911ad27a250f06bf230d28ea355e674b23dd5d7e7930c61e52eb40
BLAKE2b-256 checksum
How to use checksums
59493406d099e0db9fda25d084b88645df4f8ae2b65c8ef16f1ec2ed7d4751f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5

Release files / base_assistant_extension-0.6.6-py3-none-any.whl

Download URL base_assistant_extension-0.6.6-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c499d1650089ebdc9dac4877997685804dcbfa41c1d7dfcef7ce4bdae39e2a4
BLAKE2b-256 checksum
How to use checksums
d3cd263d330ffcbf3bafcf11d92ced7094f5d964f5fbb992774279f3e23f75fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5

Security for base-assistant-extension 0.6.6

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