Useful AI agents in 3 lines
Project description
pythbot
Useful AI agents in 3 lines.
Install
pip install pythbot
Quickstart
import pythbot
from dotenv import load_dotenv
import os
load_dotenv()
@pythbot.tool
def get_weather(city: str):
"""Get the current weather for a city"""
return f"Sunny in {city}, 28°C"
bot = pythbot.chat("You are a helpful assistant.")
bot.credentials(model="llama-3.3-70b-versatile", api_key=os.getenv("GROQ_API_KEY"), provider="groq")
bot.run()
Supported providers
| Provider | provider= value |
|---|---|
| OpenAI | "openai" |
| Anthropic | "anthropic" |
| Groq | "groq" |
Tools
Any Python function becomes an AI-callable tool with one decorator:
@pythbot.tool
def search_database(query: str, limit: int):
"""Search the product database"""
return ...
- Type hints → JSON schema (auto)
- Docstring → tool description (auto)
- Works across all providers
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
pythbot-0.3.1.tar.gz
(11.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pythbot-0.3.1-py3-none-any.whl
(14.0 kB
view details)
File details
Details for the file pythbot-0.3.1.tar.gz.
File metadata
- Download URL: pythbot-0.3.1.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
263bbe6aada3b3e9762b239419a6ab5b0b53d65615152d697b2e3370ad15837a
|
|
| MD5 |
797c79d3809e39e6d5be89b341a1ed1b
|
|
| BLAKE2b-256 |
f567d6466282368a576065da08dbf538960f08c316aef4fd8bd197870dad70d5
|
File details
Details for the file pythbot-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pythbot-0.3.1-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c2a689577702f45c11a46233b9db3c5fee187df110bbca5babc7508f7e1b2af
|
|
| MD5 |
7dd443bfb1334b08c2bc287ecb20110a
|
|
| BLAKE2b-256 |
19bdbd3d9caea773f1c3e68f7b2a7bb6398c670b49b182c1be241ed947f6ae0b
|