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.1.0.tar.gz (52.9 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.1.0-py3-none-any.whl (73.6 kB view details)

Uploaded Python 3

File details

Details for the file pythinker_core-1.1.0.tar.gz.

File metadata

  • Download URL: pythinker_core-1.1.0.tar.gz
  • Upload date:
  • Size: 52.9 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.1.0.tar.gz
Algorithm Hash digest
SHA256 ea9fa9ceac940e7e2142444b03c644ad6e8cd83b8736374790aefd6c3fb410e0
MD5 ad4f02d432d9be44716097d85f74c00c
BLAKE2b-256 9d9dd677c1dec801de76e63269da76830b464884a0f45da36dada7a1fac733f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pythinker_core-1.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: pythinker_core-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 73.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16f57402c906ce666147f1f470f8130fb98d30ca25864c1df9745fbee71dc25c
MD5 8aae963b435c04513cf43ba192521ddf
BLAKE2b-256 1ca908ad07037988ea0462385e0337a431fe9b3340f64201ad668857c5a5a0a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pythinker_core-1.1.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