Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDishTool ¶
func GetDishTool() tool.InvokableTool
func GetRestaurantTool ¶
func GetRestaurantTool() tool.InvokableTool
Types ¶
type QueryDishesParam ¶
type QueryRestaurantsParam ¶
type Restaurant ¶
type ToolQueryDishes ¶
type ToolQueryDishes struct {
// contains filtered or unexported fields
}
ToolQueryDishes.
func (*ToolQueryDishes) InvokableRun ¶
type ToolQueryRestaurants ¶
type ToolQueryRestaurants struct {
// contains filtered or unexported fields
}
func (*ToolQueryRestaurants) InvokableRun ¶
func (t *ToolQueryRestaurants) InvokableRun(ctx context.Context, argumentsInJSON string, opts ...tool.Option) (string, error)
InvokableRun tool 接收的参数和返回都是 string, 就如大模型的 tool call 的返回一样, 因此需要自行处理参数和结果的序列化. 返回的 content 会作为 schema.Message 的 content, 一般来说是作为大模型的输入, 因此处理成大模型能更好理解的结构最好. 因此,如果是 json 格式,就需要注意 key 和 value 的表意, 不要用 int Enum 代表一个业务含义,比如 `不要用 1 代表 male, 2 代表 female` 这类.
Click to show internal directories.
Click to hide internal directories.