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.1.1.tar.gz
(4.3 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
File details
Details for the file pythbot-0.1.1.tar.gz.
File metadata
- Download URL: pythbot-0.1.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e558a186499e6d96edaaf14cf06edb4e068372c60973f94cbfcb5b54f59e5ef
|
|
| MD5 |
53784ba1500b3282cbca32e7ca37d70f
|
|
| BLAKE2b-256 |
c3030223bb123ce1ce38c0ea80e889fd2aa90f109985a5b6a771cc4fa129ab04
|
File details
Details for the file pythbot-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pythbot-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.8 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 |
987361ba15c186d409cb184f06bc048a8131b2311f49e90d4ff93b774fafc091
|
|
| MD5 |
31586ba1c7137c0b6bba9712944929b1
|
|
| BLAKE2b-256 |
302b6443617512138e7017d5e6681b4bd29d95b34ea6d222b006d1341e5a0eff
|