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.0.tar.gz (6.0 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.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pythbot-0.2.0.tar.gz
  • Upload date:
  • Size: 6.0 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.0.tar.gz
Algorithm Hash digest
SHA256 b4ddab63c7cd2fb0c369928414dbae991254ea74dc7901ce104e35c5fa3371c3
MD5 32bcb59dfc62fa565a74c83940691d1a
BLAKE2b-256 28dfa8dbcf2ba9f1c7ce216e6c680c81df3e872774415a4ddc448d7269ca6869

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythbot-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3610fb2b63c4232db0e70c153b97feb40f0b8233d5400aac078ed5b0b1dbd13d
MD5 10a312747af4250bcab398141370ee11
BLAKE2b-256 e499fc06ce9532f7b18e6c494b32205b686e5aae83eeefd2c5af1683b406938b

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