Pythinker core LLM, message, provider, and tool abstractions.
Project description
Pythinker Core
Pythinker Core provides the low-level LLM, message, streaming, provider, and tool abstractions used by Pythinker CLI and Pythinker SDK.
Installation
Pythinker Core requires Python 3.12 or higher. We recommend using uv as the package manager.
uv add pythinker-core
To enable provider integrations beyond the Pythinker API, install the optional extra:
uv add 'pythinker-core[contrib]'
Example
import asyncio
import pythinker_core
from pythinker_core.chat_provider.pythinker import Pythinker
from pythinker_core.message import Message
async def main() -> None:
pythinker = Pythinker(
base_url="https://api.pythinker-ai.ai/v1",
api_key="your_pythinker_api_key_here",
model="pythinker-ai",
)
result = await pythinker_core.generate(
chat_provider=pythinker,
system_prompt="You are a helpful assistant.",
tools=[],
history=[Message(role="user", content="Who are you?")],
)
print(result.message)
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pythinker_core-1.0.0.tar.gz.
File metadata
- Download URL: pythinker_core-1.0.0.tar.gz
- Upload date:
- Size: 52.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7bb0929e651b792605cee22d3c776ebdfec1cadc17868be946e6b6c245223b9
|
|
| MD5 |
dd33980890557b35f57278753c064621
|
|
| BLAKE2b-256 |
935cbe3fcaf31241bebf2556d8ca2cb792a44c4139eaa5d9183b8af6ed48886f
|
Provenance
The following attestation bundles were made for pythinker_core-1.0.0.tar.gz:
Publisher:
release-pythinker-core.yml on mohamed-elkholy95/Pythinker-Code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pythinker_core-1.0.0.tar.gz -
Subject digest:
e7bb0929e651b792605cee22d3c776ebdfec1cadc17868be946e6b6c245223b9 - Sigstore transparency entry: 1464360512
- Sigstore integration time:
-
Permalink:
mohamed-elkholy95/Pythinker-Code@db9545e4b20b979bc22d39617b405d997a30026b -
Branch / Tag:
refs/tags/pythinker-core-1.0.0 - Owner: https://github.com/mohamed-elkholy95
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pythinker-core.yml@db9545e4b20b979bc22d39617b405d997a30026b -
Trigger Event:
push
-
Statement type:
File details
Details for the file pythinker_core-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pythinker_core-1.0.0-py3-none-any.whl
- Upload date:
- Size: 72.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6ade78ca0080cd5c83f82ff562925c0f3cb3067eea30a18e705abee78d3bf6d
|
|
| MD5 |
2f8ae68f6e60096c0e7faa42b88fe422
|
|
| BLAKE2b-256 |
a471cae7cd8b872fe3b430b583338704c2d87038410ed04aac2074cab36487dc
|
Provenance
The following attestation bundles were made for pythinker_core-1.0.0-py3-none-any.whl:
Publisher:
release-pythinker-core.yml on mohamed-elkholy95/Pythinker-Code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pythinker_core-1.0.0-py3-none-any.whl -
Subject digest:
e6ade78ca0080cd5c83f82ff562925c0f3cb3067eea30a18e705abee78d3bf6d - Sigstore transparency entry: 1464360608
- Sigstore integration time:
-
Permalink:
mohamed-elkholy95/Pythinker-Code@db9545e4b20b979bc22d39617b405d997a30026b -
Branch / Tag:
refs/tags/pythinker-core-1.0.0 - Owner: https://github.com/mohamed-elkholy95
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pythinker-core.yml@db9545e4b20b979bc22d39617b405d997a30026b -
Trigger Event:
push
-
Statement type: