Skip to content

Commit

Permalink
Minor fix and new template
Browse files Browse the repository at this point in the history
  • Loading branch information
synw committed Sep 19, 2023
1 parent c061e58 commit c69eeb6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modprompt",
"version": "0.0.4",
"version": "0.0.6",
"description": "Prompt templates for language models",
"license": "MIT",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions src/cls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class ModTemplate implements LmTemplate {
this.name = tpl.name;
this.user = tpl.user;
this.assistant = tpl.assistant;
if (tpl?.system) {
this.system = tpl.system
}
if (tpl?.shots) {
this.shots = tpl.shots
}
Expand Down
15 changes: 14 additions & 1 deletion src/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,27 @@ const templates: Record<string, LmTemplate> = {
},
},
"human_response": {
"name": "Guanaco",
"name": "Human response",
"user": "### HUMAN:\n{prompt}",
"assistant": "### RESPONSE:",
"linebreaks": {
"user": 2,
"assistant": 1
},
},
"coding_assistant": {
"name": "Coding assistant",
"system": {
"schema": "{system}",
"message": "You are a coding assistant that will help the user to resolve the following instruction:"
},
"user": "### Instruction: {prompt}",
"assistant": "### Solution:",
"linebreaks": {
"user": 2,
"system": 1,
},
}
};

export { templates }

0 comments on commit c69eeb6

Please sign in to comment.