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"
)

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))

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.0.tar.gz (3.4 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.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: corelyn_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 3.4 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.0.tar.gz
Algorithm Hash digest
SHA256 70921d86f4c5142f8ce0ff5cdbdde697ea55c32a37ca7ebc81461725f3a3fe66
MD5 35b00ad86c161cdf94f788fe20417010
BLAKE2b-256 c01041b7fa1260f30d217fc185b2ca3ce6b1a1950f9b232abe5e96c8cd21f229

See more details on using hashes here.

File details

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

File metadata

  • Download URL: corelyn_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2120ed9b6852abb1392043b0ae681d363b99db0a40c8699ff5c38ee6aa1c032b
MD5 edbd6756a074bf679b5ca69a1e93a179
BLAKE2b-256 68438a82d2cddae1d57067341098a827ae99d70e2a96930826bb81a65e65aa8f

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