Prompt for tool use?

#43
by apepkuss79 - opened

What is the difference of the chat prompt for tool use between 3.2 and 3.1? Thanks a lot!

@apepkuss79 did you got the answer ?

According to our experiments, 3.2 uses the same tool-use prompt as 3.1 uses. The following is the prompt:

<|begin_of_text|><|start_header_id|>system<|end_header_id|>

{system_message}<|eot_id|><|start_header_id|>user<|end_header_id|>

Given the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt.

Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}. Do not use variables.

[{"type":"function","function":{"name":"get_current_weather","description":"Get the current weather in a given location","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The city and state, e.g. San Francisco, CA"},"unit":{"type":"string","description":"The temperature unit to use. Infer this from the users location.","enum":["celsius","fahrenheit"]}},"required":["location","unit"]}}}]

Question: {user_message}<|eot_id|><|start_header_id|>assistant<|end_header_id|>

Sign up or log in to comment