Open wqwz111 opened 5 months ago
Can I create the ChatTool
instance like this:
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\"]"
)
)
)
Would Like to know this too!
I am interested in this as well. I want to try function calling with the Mistral 3 Instruct model because that should also support function calling. I know how to do it using Python and their API but not through Java using the MLC Chat interface.
Would Like to know this too! @tqchen
❓ General Questions
Currently I use the Qwen2-1.5B-Instruct model. I see there is a
tools
parameter inChatCompletionRequest
, but I am not clear how to construct theparameters
property ofChatFunction
. Could you please provide any example?