simple chat context manager
- override everything
- works with any model
- works with any prompt recovery system (simple history, embedding search, whatever)
- chains functions well
- uses ai-functions and executes them
install
poetry add or pip install this repo, for now
example:
from ai_chat import AiConfig
# only supports openai for now, todo: add other models
from ai_chat.openai import OpenaiChat
from ai_chat.store import SupabaseStore
from ai_functions import AIFunctions
# supports SqliteStore() as well as MemoryStore() for storing the chain of prompts
store = SupabaseStore()
conf = AiConfig(id="persona-id-1", system="You are a silly friend.")
session = OpenaiChat(store=store, ai=conf, thread_id="session-1")
def search_google():
...
def get_calendar():
...
def add_calendar():
...
session.functions = AIFunctions([search_google, get_calendar, add_calendar])
print(session.chat("hello").content)
# this contains the hello, and the reply in the context
print(session.chat("cool").content)
Metadata
Release files for ai-chat-chain 0.2.4
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 |
|---|---|---|---|---|
| ai_chat_chain-0.2.4.tar.gz | 6.6 kB | Without provenance | Details for ai_chat_chain-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_chat_chain-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for ai_chat_chain-0.2.4-py3-none-any.whl |
Total release size: 15.6 kB
Release files / ai_chat_chain-0.2.4.tar.gz
| Download URL | ai_chat_chain-0.2.4.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
903615f03baf55199004572e953bc99c675f916a2e3651e9f7fc1104187a59c5
|
|
BLAKE2b-256 checksum How to use checksums |
f83f6a68424b4b05e42f71a0ee3af9fd613f0e3d5bf891e85a34171542c2468e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.3 Windows/10
|
Release files / ai_chat_chain-0.2.4-py3-none-any.whl
| Download URL | ai_chat_chain-0.2.4-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b586e07325e662b77f6ce7a241283ac28f7593488821c11d7001f0d2287f4489
|
|
BLAKE2b-256 checksum How to use checksums |
fc36e82ea67e56faae78afeb9efe6791041c89fe6d3da16554d35c7a2ed709b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.3 Windows/10
|
Security for ai-chat-chain 0.2.4
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.