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.2.5.tar.gz (9.1 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.2.5-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pythbot-0.2.5.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for pythbot-0.2.5.tar.gz
Algorithm Hash digest
SHA256 402ed4f60ca47e36ad121de8e366a2dd40ab1f4445c44addcc505fde3ca457e7
MD5 9c05cb5e0ca3b6ca739e4121c7b82cbd
BLAKE2b-256 562cbed54acb387a02f4e0d6d8fe48ce551680fa6bbf23bce6b22a92ed60bb7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythbot-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 11.9 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.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1ddf7a45fa069d0dc6e1bd7547ba2e2c6f16f81c79f225fcb026e7664fdc56e7
MD5 7e10aa185f0d92e243c633df6716a7b8
BLAKE2b-256 4afa6f85e7e0ac6971042d3404542ea8aacb8c79a172a61b90d0bd53497765c7

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