val chatTool = ChatTool(
function = ChatFunction(
name = "get_current_weather",
description = "Get the current weather",
parameters = mapOf(
"type" to "object",
"properties" to """
|{
| "location": {
| "type": "string",
| "description": "The city and state, e.g. San Francisco, CA",
| },
| "format": {
| "type": "string",
| "enum": ["celsius", "fahrenheit"],
| "description": "The temperature unit to use. Infer this from the users location.",
| },
|}
""".trimMargin(),
"required" to "[\"location\", \"format\"]"
)
)
)
2条答案
按热度按时间aoyhnmkz1#
我可以像这样创建
ChatTool
示例:3wabscal2#
也想知道这个!