Agent Dingo
A microframework for building LLM-powered pipelines and agents.
Dingo is a compact LLM orchestration framework designed for straightforward development of production-ready LLM-powered applications. It combines simplicity with flexibility, allowing for the efficient construction of pipelines and agents, while maintaining a high level of control over the process.
Support us 🤝
You can support the project in the following ways:
- ⭐ Star Dingo on GitHub (click the star button in the top right corner)
- 💡 Provide your feedback or propose ideas in the issues section or Discord
- 📰 Post about Dingo on LinkedIn or other platforms
- 🔗 Check out our other projects: Scikit-LLM, Falcon
Quick Start & Documentation 🚀
Step 1: Install agent-dingo
pip install agent-dingo
Step 2: Configure your OpenAI API key
export OPENAI_API_KEY=<YOUR_KEY>
Step 3: Build your pipeline
Example 1 (Linear Pipeline):
from agent_dingo.llm.openai import OpenAI
from agent_dingo.core.blocks import PromptBuilder
from agent_dingo.core.message import UserMessage
from agent_dingo.core.state import ChatPrompt
# Model
gpt = OpenAI("gpt-3.5-turbo")
# Summary prompt block
summary_pb = PromptBuilder(
[UserMessage("Summarize the text in 10 words: ```{text}```.")]
)
# Translation prompt block
translation_pb = PromptBuilder(
[UserMessage("Translate the text into {language}: ```{summarized_text}```.")],
from_state=["summarized_text"],
)
# Pipeline
pipeline = summary_pb >> gpt >> translation_pb >> gpt
input_text = """
Dingo is an ancient lineage of dog found in Australia, exhibiting a lean and sturdy physique adapted for speed and endurance, dingoes feature a wedge-shaped skull and come in colorations like light ginger, black and tan, or creamy white. They share a close genetic relationship with the New Guinea singing dog, diverging early from the domestic dog lineage. Dingoes typically form packs composed of a mated pair and their offspring, indicating social structures that have persisted through their history, dating back approximately 3,500 years in Australia.
"""
output = pipeline.run(text = input_text, language = "french")
print(output)
Example 2 (Agent):
from agent_dingo.agent import Agent
from agent_dingo.llm.openai import OpenAI
import requests
llm = OpenAI(model="gpt-3.5-turbo")
agent = Agent(llm, max_function_calls=3)
@agent.function
def get_temperature(city: str) -> str:
"""Retrieves the current temperature in a city.
Parameters
----------
city : str
The city to get the temperature for.
Returns
-------
str
String representation of the json response from the weather api.
"""
base_url = "https://api.openweathermap.org/data/2.5/weather"
params = {
"q": city,
"appid": "<openweathermap_api_key>",
"units": "metric"
}
response = requests.get(base_url, params=params)
data = response.json()
return str(data)
pipeline = agent.as_pipeline()
For a more detailed overview and additional examples, please refer to the documentation.
Metadata
Release files for agent-dingo 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_dingo-1.0.0.tar.gz | 27.7 kB | Without provenance | Details for agent_dingo-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_dingo-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for agent_dingo-1.0.0-py3-none-any.whl |
Total release size: 63.8 kB
Release files / agent_dingo-1.0.0.tar.gz
| Download URL | agent_dingo-1.0.0.tar.gz |
|---|---|
| Size | 27.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e308fb0bfa1070fea6aecf802aa74653a84e08a44f374afcb620f7cf10354591
|
|
BLAKE2b-256 checksum How to use checksums |
0a207b645befde4192ba474c2ac325a3bebf8e252d9f36b675cae7f968d3bbc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.14
|
Release files / agent_dingo-1.0.0-py3-none-any.whl
| Download URL | agent_dingo-1.0.0-py3-none-any.whl |
|---|---|
| Size | 36.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73d2fde8b23afc9a212f8c27f5bf988d73e15df12f2faf69c90546fa80bdd01b
|
|
BLAKE2b-256 checksum How to use checksums |
2e50f98b4a1d373cd91348f53045e8bb53dc5950a17ec921117fa0ca160993b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.14
|
Security for agent-dingo 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.