chat

package
v1.801.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package chat is the ONE canonical chat orchestrator for Hanzo Cloud: POST /v1/chat runs a single LLM tool-calling round that lets a model manage a system through tools. It COMPOSES existing cloud pieces rather than reinventing them —

  • LLM routing + per-org reserve/settle billing: the ai subsystem's /v1/chat/completions, invoked in-process (the ONLY path that both returns tool_calls and carries the billing gate);
  • the unified tool plane (clients/tools): the org's registered MCP/registry tools are offered to the model and dispatched server-side through the ONE per-principal plane (activation + price gates included);
  • capabilities (capability.go): the system prompt + builtin tool defs that frame a round for a use case (graph editing, product/fashion render).

A round yields three things: the assistant's text (reply), the tool calls the server executed against the registry (actions), and the tool calls the client must apply itself — a graph/UI mutation the server cannot run (ops).

Route ownership: chat OWNS /v1/chat. The ai module also registers a beego /v1/chat alias behind its /v1/* catch-all, but chat mounts BEFORE ai in Wire, so Fiber's first-match resolves /v1/chat here and the alias is shadowed (never reached). ai keeps /v1/chat/completions and /v1/completions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(app *zip.App, deps cloud.Deps) error

Mount wires POST /v1/chat onto app. It composes the ai completion path and the tool plane; it owns no store, so there is no Shutdown.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL