mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-06 02:32:40 +00:00
feat: update defaul tool use prompt
# What does this PR do? ## Test Plan
This commit is contained in:
parent
cb2a9784ab
commit
48abe67eb2
1 changed files with 5 additions and 4 deletions
|
@ -229,6 +229,11 @@ class PythonListCustomToolGenerator(PromptTemplateGeneratorBase): # noqa: N801
|
||||||
You are an expert in composing functions. You are given a question and a set of possible functions.
|
You are an expert in composing functions. You are given a question and a set of possible functions.
|
||||||
Based on the question, you may or may not need to make one function/tool call to achieve the purpose.
|
Based on the question, you may or may not need to make one function/tool call to achieve the purpose.
|
||||||
|
|
||||||
|
If you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]
|
||||||
|
If you decide to invoke a function, you SHOULD NOT include any other text in the response. besides the function call in the above format.
|
||||||
|
For a boolean parameter, be sure to use `True` or `False` (capitalized) for the value.
|
||||||
|
|
||||||
|
|
||||||
{{ function_description }}
|
{{ function_description }}
|
||||||
""".strip("\n")
|
""".strip("\n")
|
||||||
)
|
)
|
||||||
|
@ -243,10 +248,6 @@ class PythonListCustomToolGenerator(PromptTemplateGeneratorBase): # noqa: N801
|
||||||
def _gen_function_description(self, custom_tools: List[ToolDefinition]) -> PromptTemplate:
|
def _gen_function_description(self, custom_tools: List[ToolDefinition]) -> PromptTemplate:
|
||||||
template_str = textwrap.dedent(
|
template_str = textwrap.dedent(
|
||||||
"""
|
"""
|
||||||
If you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]
|
|
||||||
For a boolean parameter, be sure to use `True` or `False` (capitalized) for the value.
|
|
||||||
You SHOULD NOT include any other text in the response.
|
|
||||||
|
|
||||||
Here is a list of functions in JSON format that you can invoke.
|
Here is a list of functions in JSON format that you can invoke.
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue