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.2.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.2.tar.gz.
File metadata
- Download URL: pythbot-0.1.2.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 |
46c0b2e71372a9e7095e752dc314b6d9f89b148d2042a79e5ae465fe66b7d6f4
|
|
| MD5 |
df322355d43756869f5c24bf3b366594
|
|
| BLAKE2b-256 |
ba83c389028d65786044dce26cee416bbf0e9132c851b7b14cca92179a213c97
|
File details
Details for the file pythbot-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pythbot-0.1.2-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 |
b9e0677127e70c0d2f56514e4932394573ef6a672bc896775e9e319b73e57ff3
|
|
| MD5 |
1bcbc5e6071789fb7147410735c72766
|
|
| BLAKE2b-256 |
2a34bcc2a93f1b0f27c75925843522cb3ea2ee748385243af70440c88e71e906
|