Skip to main content

Add your description here

Project description

English | 中文

Installation

  1. Install package:
uv pip install hero-core hero-tools 
  1. Quickly Start
from hero import Hero, Model, Tool
from hero_tools import crewl_web, download_file


default_model = Model(
    model_name="deepseek",
    model_url="https://api.example.com/v1",
    model_api_key="api-key",
)

hero = Hero(
    name="hero",
    model=default_model,
)

tool = Tool()

@hero.tool("add")
def add_func(a, b):
    """
    <desc>Addition calculator</desc>
    <params>
        <a type="number">addend a</a>
        <b type="number">addend b</b>
    </params>
    <example>
        {
            "tool": "add",
            "params": {
                "a": 1, 
                "b": 2
            }
        }
    </example>
    """
    return a + b

hero.add_tool(crewl_web, download_file, add_func)

hero.run(question="some question")

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

hero_core-0.1.0.tar.gz (63.1 kB view details)

Uploaded Source

Built Distribution

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

hero_core-0.1.0-py3-none-any.whl (98.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hero_core-0.1.0.tar.gz
  • Upload date:
  • Size: 63.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hero_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 74933edbc9fbc7a4ccffce0e6d223fe1abd5d3d88500a5579615d9bdc2581354
MD5 b471e7d2cfb2a9be341fe4e6a802b52c
BLAKE2b-256 1650241a5680a3087e1c34d6e8b37b86557ccd7bd43f4e20e77ae42e52c9ab48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hero_core-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 98.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hero_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64aa1b62f7e4a1f9db77d5decdc14bcc70218a2ceefc665d5086995161467604
MD5 298eb1efc7a02b70d1ed77667c376a0e
BLAKE2b-256 c57617aebbccadcf38904cab1a4d3855097bfeab40cb32373b6bc63b2a591715

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