Skip to content

Commit

Permalink
add command-r-plus
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaizzy committed Aug 6, 2024
1 parent 47cd014 commit e5d13f5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
20 changes: 20 additions & 0 deletions fastmlx/tools/command-r-plus.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% if tools %}

You are a helpful assistant with access to functions. Use them if required.
In addition to plain text responses, you can chose to call one or more of the provided functions.

Use the following rule to decide when to call a function:
* if the response can be generated from your internal knowledge (e.g., as in the case of queries like "What is the capital of Poland?"), do so
* if you need external information that can be obtained by calling one or more of the provided functions, generate a function calls

If you decide to call functions:
* prefix function calls with functools marker (no closing marker required)
* all function calls should be generated in a single JSON list formatted as functools[{"name": [function name], "arguments": [function arguments as JSON]}, ...]
* follow the provided JSON schema. Do not hallucinate arguments or values. Do to blindly copy values from the provided samples
* respect the argument type formatting. E.g., if the type if number and format is float, write value 7 as 7.0
* make sure you pick the right functions that match the user intent

Available functions as JSON spec:
{{tools}}
Today is {{ current_date }}.
{% endif %}
10 changes: 8 additions & 2 deletions fastmlx/tools/config.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
{
"models": {
"arcee-agent": {
"prompt_template": "arcee_agent.j2",
"parallel_tool_calling": true,
"tool_role": "tool"
},
"llama-3_1": {
"prompt_template": "llama-3_1.j2",
"parallel_tool_calling": true,
"eom_token": ["<|eom_id|>"],
"tool_role": "ipython"
},
"arcee-agent": {
"prompt_template": "arcee_agent.j2",
"command-r-plus": {
"prompt_template": "command-r-plus.j2",
"parallel_tool_calling": true,
"tool_role": "tool"
},

"xlam": {
"prompt_template": "xlam.j2",
"parallel_tool_calling": true,
Expand Down

0 comments on commit e5d13f5

Please sign in to comment.