Skip to main content

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.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythbot-0.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file pythbot-0.1.0.tar.gz.

File metadata

  • Download URL: pythbot-0.1.0.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

Hashes for pythbot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a65237655ca860671f34e6663ea07eee3bf5f685bd5e18a9d7302cad6579fbac
MD5 120a76eab64def99e0b1a8f41efade61
BLAKE2b-256 b6b324c50b1beb96aca034a099e78f54192d1ec791016cf081cebe49097bc8fa

See more details on using hashes here.

File details

Details for the file pythbot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pythbot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for pythbot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7e541aac0efb99cada9335f0b4ec0c7dc14dbf12f946a1773726aecf329ee11
MD5 e9f90c3200fd4d584daaebcdb34bcc78
BLAKE2b-256 82502fa5c34e58cb0426ff9e07832c86b47f760523d1af95c8c837c147fc28a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page