Skip to main content

Python SDK for the Mixgarden API

Project description

Mixgarden Python SDK

pip install mixgarden
  • Use get_models() to get a list of available models and providers.
  • Use get_plugins() to get a list of available plugins.
  • Use get_conversations() to get a list of available conversations.
  • Use get_conversation(id) to get a specific conversation.
  • Use chat(model, messages) when you’re building a conversational UI, or want the platform to maintain context for you.
  • Use get_mg_completion(model, content) when you need a one-off, stateless generation enhanced by Mixgarden plugins.
  • Use get_completion(model, messages) when you need a one-off, stateless generation directly from LLM (Raw LLM Output).
import os
from mixgarden import MixgardenSDK

sdk = MixgardenSDK(api_key=os.getenv("MIXGARDEN_API_KEY"))

# List available models
models = sdk.get_models()

# Stateful chat (conversation is stored server-side)
chat = sdk.chat(
    model="openai/gpt-4o-mini",
    # Optionally add conversationId to add to an existing conversation
    # conversationId: "your-convo-id",
    content="Hello mixgarden!",
    pluginId="tone-pro",
    pluginSettings={
        "emotion-type": "neutral",
        "emotion-intensity": 6,
        "personality-type": "friendly",
    },
)

# Other helper calls
plugins = sdk.get_plugins()
conversations = sdk.get_conversations()
conversation = sdk.get_conversation(conversations[0]["id"])

# One-shot completion (Mixgarden Enhanced)
completion = sdk.get_mg_completion(
    model="openai/gpt-4o-mini",
    content="hello mixgarden!",
    maxTokens=100,
    temperature=0.7,
    pluginId="tone-pro",
    pluginSettings={
        "emotion-type": "neutral",
        "emotion-intensity": 6,
        "personality-type": "friendly"
    }
)

# One-shot completion (Raw LLM Output)
completion = sdk.get_completion(
    model= "openai/gpt-4o-mini",
    messages=[{"role": "user", "content": "Hi there!"}],
    maxTokens=100,
    temperature=0.7,
)

print(chat)
print(completion)

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

mixgarden-0.1.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

mixgarden-0.1.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file mixgarden-0.1.2.tar.gz.

File metadata

  • Download URL: mixgarden-0.1.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for mixgarden-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1b7ddab4f4aaf73fa97665e3bb77fb0317254ab8f084438dbc8fd667000360ee
MD5 e675389c42fb500c93983906371e89fd
BLAKE2b-256 4a9c68c45986504b732eb234e65cce757e543d80d07435d589459ffa26a8cb2d

See more details on using hashes here.

File details

Details for the file mixgarden-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mixgarden-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for mixgarden-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b0ebf26dc47c2db96b24c27f5a0c9a2ac911310928ab9bd74a9ca9dc196dee93
MD5 1575cbc7559a826c37836e85d09a88c9
BLAKE2b-256 31e726b57ea1bf94d70423da0768ae7124bff6b43492cf0590ef890d23a5d742

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