Skip to main content

The simplest way to use LLMs

Project description

CoreLLM SDK

The simplest way to use LLMs.

📦 Install from PyPI

pip install corellm-sdk

🤖 Available Models

The following models are available on the server. Do not use any other model names.

  • "gemma4:e4b" - text, vision, tools, thinking, audio, context=128k
  • "devstral:24b" - text, tools, context=128k
  • "cogito:14b" - text, tools, thinking, context=128k
  • "ornith:9b" - Text, thinking, tools, context=256k
  • "lfm2.5-thinking:1.2b" - ultra fast, tools, thinking, context=32k
  • "qwen3-embedding:8b" - embedding
  • "robit/ornith-vision:9b" - vision, tools, thinking

🚀 Quickstart

The new CoreLLMChat class wraps everything into a single, cohesive, LangChain-compatible chat model.

from corellm_sdk import CoreLLMChat

# Initialize the engine
llm = CoreLLMChat(
    model="gemma4:e4b"
)

🧩 LangChain & LangGraph Support

Use it seamlessly with your existing LangChain workflows:

from langchain_core.messages import HumanMessage
from langchain_core.prompts import ChatPromptTemplate

# Direct usage
response = llm.invoke([HumanMessage(content="Hello!")])
print(response.content)

# With Chains
chain = ChatPromptTemplate.from_messages([
    ("system", "You are a helpful assistant."),
    ("human", "{question}"),
]) | llm

print(chain.invoke({"question": "What is Python?"}).content)

🛠 Raw APIs (raw_chat & raw_generate)

If you want simpler formats:

# Raw Prompt Completion
print(llm.raw_generate("Explain quantum physics in 1 sentence."))

# Standard Dict Chat
messages = [{"role": "user", "content": "Who are you?"}]
print(llm.raw_chat(messages))

🔄 Dynamic Model Switching

Switch models on the fly! The backend dynamically handles memory constraints and load transitions.

# Switch to another allowed model on your server!
llm.switch("devstral:24b")

print(llm.raw_generate("Hello from Devstral!"))

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

corellm_sdk-1.1.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

corellm_sdk-1.1.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file corellm_sdk-1.1.2.tar.gz.

File metadata

  • Download URL: corellm_sdk-1.1.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for corellm_sdk-1.1.2.tar.gz
Algorithm Hash digest
SHA256 df3ced6852cc6d4defaa97fa9dfc950c525590e514104e5f9f584c9db4188c55
MD5 53d75601188081a0a6dea33e4b69960d
BLAKE2b-256 3f674de251988679daba204bf9a8e19be7234dd2dbd0fe405c69dcc98f10bec1

See more details on using hashes here.

File details

Details for the file corellm_sdk-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: corellm_sdk-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for corellm_sdk-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 229bb066a58c45878096b87cb3f2cf0f9de052a11c18352891efc69e34b89e20
MD5 3ef75e8f56a375a841e0cb077728bd01
BLAKE2b-256 d5ad13e248c3be80863a531b191907ee04da97ff3d6851c2f75948b003d5f109

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