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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pythinker_core-1.1.1.tar.gz
  • Upload date:
  • Size: 53.1 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.1.tar.gz
Algorithm Hash digest
SHA256 2e756ec76ee3c1a1dc958bb77a8cfb68ddc5abd95d5748ee7961403117f946ff
MD5 cef3d763131f705cd457074b11eb6c8a
BLAKE2b-256 519743d602bbb7625b36b664e03a00d2ff97c63802d1fb9ae5d176986a102640

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pythinker_core-1.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98bf4210e1cc24c2dae3aacccc5bb0619f40e0551a0124d8a262eb9b58d5baa4
MD5 f1e883affa1c76d681db48e1219e2e5c
BLAKE2b-256 16a08aea4a6a913c737761e66107ec139be4fc7fedec96657f005f527046cc5b

See more details on using hashes here.

Provenance

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