Skip to main content

Python SDK for Corelyn AI API

Project description

corelyn-sdk

Python SDK for Corelyn AI API.

Installation

pip install corelyn-sdk

Usage

For setting the System Prompt once

from corelyn_sdk import CorelynSDK

sdk = CorelynSDK(
    api_key="your-api-key",
    system_prompt="You are a helpful assistant",
    default_model="cerebras/llama3.1-8b"
)

print(sdk.get_ai_response("Explain AI"))

For overiting the System Prompt per prompt

from corelyn_sdk import CorelynSDK

sdk = CorelynSDK("your-api-key")

print(
    sdk.get_ai_response(
        "Write a joke",
        system_prompt="You are a sarcastic comedian"
    )
)

For full conversations (good for chatbots)

from corelyn_sdk import CorelynSDK

messages = [
    {"role": "system", "content": "You are Corelyn"},
    {"role": "user", "content": "Hello"},
    {"role": "assistant", "content": "Hi!"},
    {"role": "user", "content": "Tell me a joke"}
]

sdk = CorelynSDK("your-api-key")

print(sdk.get_ai_response(messages=messages))

Set diffrent model

sdk.set_model("nvidia/moonshotai/kimi-k2.5")

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

corelyn_sdk-0.2.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

corelyn_sdk-0.2.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file corelyn_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: corelyn_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for corelyn_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 995ca448c30e29899c37add9d8d1e66616cbe164ed0b7e8584b25310548acb0b
MD5 18d3baa405a96d1919d1535d2f43039d
BLAKE2b-256 45cc0e23233c1d14b4e436cbf25ad709990cc7bd25d6683c7da6c5091463fd9f

See more details on using hashes here.

File details

Details for the file corelyn_sdk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: corelyn_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for corelyn_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6153f541ccab3e0e39fe5ad633a10f506a417ffcd6950883de1f4b5a1bab1a0
MD5 a01b3fe5ed04c5854fec6805063c1743
BLAKE2b-256 be7f10da517ed0f9b2e6f599b197cc4aba71be5915a322357356938aad1111d8

See more details on using hashes here.

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