Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythinker_core-1.0.0.tar.gz (52.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythinker_core-1.0.0-py3-none-any.whl (72.9 kB view details)

Uploaded Python 3

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

Hashes for pythinker_core-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e7bb0929e651b792605cee22d3c776ebdfec1cadc17868be946e6b6c245223b9
MD5 dd33980890557b35f57278753c064621
BLAKE2b-256 935cbe3fcaf31241bebf2556d8ca2cb792a44c4139eaa5d9183b8af6ed48886f

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pythinker_core-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6ade78ca0080cd5c83f82ff562925c0f3cb3067eea30a18e705abee78d3bf6d
MD5 2f8ae68f6e60096c0e7faa42b88fe422
BLAKE2b-256 a471cae7cd8b872fe3b430b583338704c2d87038410ed04aac2074cab36487dc

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page