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.
  • 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_completion(model, messages) when you need a quick, stateless generation and want absolute control over the prompt and token usage.
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="gpt-4o-mini",
    content="Hi there!",
    conversationId="123",
    pluginId="456",
    pluginSettings={"foo": "bar"},
)

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

# Stateless, one-shot completion (OpenAI-style)
completion = sdk.get_completion(
    model= models[0]["id"],
    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.0.tar.gz (2.3 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.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mixgarden-0.1.0.tar.gz
  • Upload date:
  • Size: 2.3 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.0.tar.gz
Algorithm Hash digest
SHA256 0be6940e3ee315b5b4d026c61e78b8f30c4ce8e06e2b71ab43afe897113e29c9
MD5 b5bdc06807f390e58c1ab27080ab9406
BLAKE2b-256 82e70bad78a1612f64ea5cc547049a5d79af4878276841f61c9446db25dc8c15

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mixgarden-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67c37ac7e21291f963de508637b5e63a43d672e41843aa579943a8390f974790
MD5 3a1c3b0c71c190c47075ba92c32435c4
BLAKE2b-256 ef5ade7bbab36c2e97a6f55874eddd56abf6fecce46a34ff5fb62632a143b968

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