Skip to main content

Commonbase Python SDK

Project description

Commonbase Python SDK

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 is required for all Commonbase requests. You can find your project ID in the Commonbase Dashboard.

To create text and chat completions, use commonbase.Completion.create:

import commonbase

project_id=

result = commonbase.Completion.create(
    project_id="<your_project_id>",
    prompt="Hello!"
)

print(result.choices[0].text)

To stream a completion as it is generated, use commonbase.Completion.stream.

For more examples, see /examples.

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.1.5.tar.gz (23.2 MB view hashes)

Uploaded Source

Built Distribution

commonbase-0.1.5-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

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