Metadata-Version: 2.4
Name: entari-plugin-hyw
Version: 4.0.11
Summary: Entari plugin for HYW - Use large language models to interpret chat messages
Author-email: kumoSleeping <zjr2992@outlook.com>
License: MIT
Project-URL: Homepage, https://github.com/kumoSleeping/entari-plugin-hyw
Project-URL: Repository, https://github.com/kumoSleeping/entari-plugin-hyw
Project-URL: Issue Tracker, https://github.com/kumoSleeping/entari-plugin-hyw/issues
Keywords: entari,llm,ai,bot,chat
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: <3.13,>=3.10
Description-Content-Type: text/markdown
Requires-Dist: arclet-entari[full]>=0.16.5
Requires-Dist: openai>=1.0.0
Requires-Dist: duckduckgo-search>=6.0.0
Requires-Dist: DrissionPage>=4.0.0
Requires-Dist: trafilatura>=1.6.0
Requires-Dist: loguru>=0.7.0
Requires-Dist: Pillow>=10.0.0
Requires-Dist: markdown>=3.10
Requires-Dist: satori-python-core<0.18.0
Requires-Dist: satori-python-client<0.18.0
Provides-Extra: dev
Requires-Dist: entari-plugin-server>=0.5.0; extra == "dev"
Requires-Dist: satori-python-adapter-onebot11>=0.2.5; extra == "dev"
Requires-Dist: noneprompt; extra == "dev"
Requires-Dist: rich; extra == "dev"

# entari-plugin-hyw

[简体中文](README.zh-CN.md)

An Entari plugin for chat-oriented agent workflows.

## Status

Usable and under active development.

## What It Does

- Chat Q&A command entry (`question_command`, default `/q`).
- Reply-based multi-turn continuation.
- Optional image context ingestion.
- Web search tool integration (`web_search`) with time and region controls.
- Optional card-style rendering for Markdown-heavy outputs.

## Architecture

```mermaid
flowchart LR
    A[Command Input] --> B[FlowRunner]
    B --> C[Agent Session]
    C --> D[Policy-driven Tool Calls]
    D --> E[web_search / web_fetch]
    E --> C
    C --> F[final_response]
    F --> G{render?}
    G -->|yes| H[Card Image]
    G -->|no| I[Plain Text]
```

## Configuration

Configure `plugins.entari_plugin_hyw` in `entari.yml`:

```yaml
plugins:
  entari_plugin_hyw:
    question_command: "/q"
    web_command: "/w"
    headless: false
    quote: false
    theme_color: "#ef4444"

    api_key: "YOUR_API_KEY"
    base_url: "https://openrouter.ai/api/v1"
    model_name: "gpt-4o"
    temperature: 0.5
```

| Key | Default | Notes |
| --- | --- | --- |
| `api_key` | `null` | LLM API key. |
| `base_url` | `https://openrouter.ai/api/v1` | LLM endpoint root. |
| `model_name` | `gpt-4o` | Main model ID. |
| `temperature` | `0.5` | Sampling temperature. |
| `question_command` | `/q` | Main command trigger. |
| `web_command` | `/w` | Reserved field; currently not wired to a separate handler. |
| `headless` | `false` | Browser/render headless mode. |
| `quote` | `false` | Reply with quote context. |
| `theme_color` | `#ef4444` | Rendered card accent color. |

## Search Policy Notes

- Model-side `time_range` convention: `a/d/w/m/y`.
- Runtime strips unsupported filters before request.
- At least one query should use `d` or `w` for freshness checks when searching.
- `kl` is optional; set only when region precision is needed.

## License

MIT
