Skip to main content

Add your description here

Project description

English | 中文

Installation

  1. Install package:
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.2.tar.gz (76.8 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.2-py3-none-any.whl (93.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hero_core-0.1.2.tar.gz
  • Upload date:
  • Size: 76.8 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.2.tar.gz
Algorithm Hash digest
SHA256 3190c998fb5394d8bdf42e315f5427b89cccd8d3c947509f7b29b7927e240f54
MD5 78339a98d0d4dc13dbdd323efdb79b8b
BLAKE2b-256 2bdcae1b1da2d38c45fbdb0dc0b12ffd2a5302f4871f3699df85b3f70bdd9333

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hero_core-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 93.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1582ae743811463ef9797d087a670e79ffc512282d08b83106f1d85c3a90a5cf
MD5 c9279c0112a89844ae2f7dbf0dc4a8c7
BLAKE2b-256 e47024cbf551a2138d1578035a3596c07b3eecbffb7d365a8c6f1fa12d608370

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