Skip to main content

Commonbase Python SDK

Project description

Commonbase Python SDK

PyPI version

Commonbase allows developers to integrate with any popular LLM API provider without needing to change any code. The SDK helps with collecting data and feedback from the users and helps you fine-tune models for your specific use case.

Installation

pip install commonbase

Usage

A Project ID and API Key are required for all Commonbase requests. You can find your project ID and generate an API key in the Commonbase Dashboard.

To create a text completion, provide your Project ID, API Key, and prompt to Completion.create.

import commonbase

result = commonbase.Completion.create(
    api_key="API_KEY",
    project_id="PROJECT_ID",
    prompt="Hello!"
)

print(result.best_choice.text)

To stream a completion as it is generated, use ChatCompletion.stream.

For more examples, see /examples or check out our Docs.

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

commonbase-0.4.1.tar.gz (23.2 MB view details)

Uploaded Source

Built Distribution

commonbase-0.4.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file commonbase-0.4.1.tar.gz.

File metadata

  • Download URL: commonbase-0.4.1.tar.gz
  • Upload date:
  • Size: 23.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for commonbase-0.4.1.tar.gz
Algorithm Hash digest
SHA256 13a3f35535ab2ba4efcc0a041d3bb341355d7ecbf897d1015fa72d2b0c4af78b
MD5 99eb07e046775c6c7e04c5ebd138f840
BLAKE2b-256 8ea5ca1f6757db958dbd115b0cbaa57cf9dfc32b8051ef6da13b380749d361d7

See more details on using hashes here.

File details

Details for the file commonbase-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: commonbase-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for commonbase-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e14963b7d0b9893b014b7586910bdadcc20b549b21b4f24cb1edd85e25c88f5
MD5 51cc3708aae4d925e75a588fe520a5e9
BLAKE2b-256 bcf95c72846b396a9c51f524c8c776856d5a32162fc254491d66e8b1efa16c41

See more details on using hashes here.

Supported by

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