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.2.0.tar.gz (53.4 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.2.0-py3-none-any.whl (73.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pythinker_core-1.2.0.tar.gz
  • Upload date:
  • Size: 53.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pythinker_core-1.2.0.tar.gz
Algorithm Hash digest
SHA256 5efa545cd4835ad07464957f3a96c9511fc178645e8b62caf49d3ef64aa6a71d
MD5 a89ed95db535087ac3cabafabe3b61fd
BLAKE2b-256 e2635eb9258c3ce214182fc302fd1b12b8e3d55506fead7347c3de35e6cbd1b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pythinker_core-1.2.0.tar.gz:

Publisher: release-pythinker-core.yml on Pythoughts-labs/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.2.0-py3-none-any.whl.

File metadata

  • Download URL: pythinker_core-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 73.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pythinker_core-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f2b9228ec983633254d79dc06bbe684d5dc5b98b2d11728a0f534653ff5b6a4
MD5 571ab4d3764d1c2dfd7d7fa8c3dd5545
BLAKE2b-256 cb9954cc825eb328254c64d6d361c892001466e023f18b03e6e55ea47310f343

See more details on using hashes here.

Provenance

The following attestation bundles were made for pythinker_core-1.2.0-py3-none-any.whl:

Publisher: release-pythinker-core.yml on Pythoughts-labs/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