-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(guide): add light version to extract title
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
input: | ||
- content # The content to titleify | ||
- len: {type: "number"} # the optional max length of the title. It is not precise, just an approximate number. | ||
- temperature # the optional temperature of the LLM. | ||
len: -1 # the default max length of the title, -1 means no limit | ||
temperature: 0.01 # the default temperature of the LLM. | ||
--- | ||
- system: |- | ||
Extract the title from the markdown content provided by the user. | ||
{%- if len and len > 0 -%} | ||
Keep the title within {{len}} characters. | ||
{% endif %} | ||
Output the title ONLY. DO NOT EXPLAIN. | ||
- user: |- | ||
{{content}} | ||
- assistant: "[[titles:max_tokens=len, temperature]]" |