QuickstartPrompt ConfigAPISign In  
User Avatar
Reference / Quickstart  52d
Drone Labour Language Model Library

 
A powerful Python SDK for seamless LLM integration across multiple providers.
 
Repository: https://gitlab.com/dronelabourlm/dllm-python
 
Supported LLM providers:
  • OpenAI: chat completions, images generations, images edits, responses
  • Grok: chat completions, images generations
  • Anthropic Claude
  • Gemini: content generation (text), predict (image generation)
 
Installation

 
git clone [email protected]:dronelabourlm/dllm-python.git cd dllm-python pip install -e .
 
Authentication

 
To use DLLM library locally as LLM API wrapper, you need to set up authentication by setting the environment variables of your LLM API provider. DLLM library loads the API keys from the environment variables as the same way of the original SDKs.
 
To use DLLM library with DLLM cloud, you need to set up your API keys in settings page.
And follow the instructions in API Reference to use DLLM library with remote server.
 
Quickstart

 
Given a simple chat call example:
Let's make several improvements:
    
  1. Simplify the LLM API calls.
  2. Extract the username as a parameter.
  3. Make the chat reusable across different LLM providers.
 
Here's the rewritten chat call using the DLLM library:
 
We've achieved goals 1 and 2. Now let's work on 3: generalise the chat call across different LLM providers.
 
Next, we'll create a prompt configuration in JSON format for the chat call.