don't use tools system message when tools off
This commit is contained in:
parent
1549fd77aa
commit
0f05f580ef
1 changed files with 9 additions and 3 deletions
|
|
@ -71,10 +71,16 @@ function constructSystemPrompt(
|
|||
provider: string,
|
||||
useTools: boolean,
|
||||
): string | null {
|
||||
if (CUSTOM_SYS_MSG_MODEL_FAMILIES.some((family) => model.includes(family))) {
|
||||
if (
|
||||
useTools &&
|
||||
CUSTOM_SYS_MSG_MODEL_FAMILIES.some((family) => model.includes(family))
|
||||
) {
|
||||
return SYSTEM_MESSAGE + "\n\n" + TOOL_USE_RULES;
|
||||
}
|
||||
if (useTools && modelSupportsTools(model, provider)) {
|
||||
} else if (
|
||||
CUSTOM_SYS_MSG_MODEL_FAMILIES.some((family) => model.includes(family))
|
||||
) {
|
||||
return SYSTEM_MESSAGE;
|
||||
} else if (useTools && modelSupportsTools(model, provider)) {
|
||||
return TOOL_USE_RULES;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue