Documentation
¶
Overview ¶
Package builtin 提供框架内置的技能(如 echo)。
内置技能与业务解耦:All() 汇总全部技能供统一注册。新增内置技能时,在本包 新建一个文件实现该技能,并把它的构造函数追加到 All(),即可自动接入各 Provider 的 skill-call 链路,无需改动上层注册逻辑。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetWeather ¶
GetWeather 返回一个「获取天气」技能(当前返回模拟数据,供演示 / 联调)。
同一城市返回确定的温度,便于测试断言。后续接入真实天气服务时,只需替换 mockWeather 的内部实现,技能定义与签名保持不变。
func ReviewGuide ¶
ReviewGuide 返回一个「代码评审指南」静态技能。
它演示了 Static 型(纯指令型)技能:没有可执行逻辑(无 fn),只有一段 markdown 指令正文。这类技能的 Invoke 会原样返回 Instructions,主要用于把「教模型怎么 做」的上下文注入到 system prompt,供模型在没有 function calling 时也能感知。
Types ¶
type GetWeatherInput ¶
type GetWeatherInput struct {
City string `json:"city"` // 城市名(必填)
Unit string `json:"unit"` // 温度单位:celsius / fahrenheit,默认 celsius
}
GetWeatherInput 是 get_weather 技能的入参。
Click to show internal directories.
Click to hide internal directories.