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:
Simplify the LLM API calls.
Extract the username as a parameter.
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.