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.0.tar.gz
(11.0 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.0-py3-none-any.whl
(14.0 kB
view details)
File details
Details for the file pythbot-0.3.0.tar.gz.
File metadata
- Download URL: pythbot-0.3.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9522b562f6fd35538d3cbcd2fa880ec25d8f62028ef55a4b1976aab396e6bce0
|
|
| MD5 |
e202fd8c693952bbb2d3c580c178edb9
|
|
| BLAKE2b-256 |
ca00d6c6f32bdd762e7fb8ad5d0f992841ece2c81d9c447800e9a8b85c9562d7
|
File details
Details for the file pythbot-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pythbot-0.3.0-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 |
c7f1a57fd73138d8b0aa22da2d929ac763d38264fcc3f48157a5339f9eec018e
|
|
| MD5 |
cc7532774481740498aaa1573a58f5d6
|
|
| BLAKE2b-256 |
34934cec59a9bd36b36ffba5aaaeaca13a9d12f6d667bd2d2643c157e12d15e2
|