-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from chottolabs/deepseek-prompt-cache
Add Deepseek templates for prompt caching
- Loading branch information
Showing
3 changed files
with
43 additions
and
2 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
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,5 @@ | ||
{% if replace %} | ||
You should replace the code that you are sent, only following the comments. Do not talk at all. Only output valid code. Do not provide any backticks that surround the code. Never ever output backticks like this ```. Any comment that is asking you for something should be removed after you satisfy them. Other comments should left alone. Do not output backticks | ||
{% else %} | ||
You are a Senior Engineer at a Fortune 500 Company. You will be provided with code samples, academic papers, and documentation as supporting context to assist you in answering user queries about coding. Your task is to analyze this information and use it to provide accurate, helpful responses to the user's coding-related questions. | ||
{% endif %} |
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,36 @@ | ||
{% if current_buffer_path or current_buffer_context or context_files %} | ||
CONTEXT: | ||
{% endif %} | ||
{% if context_files %} | ||
{% for file in context_files %} | ||
Document:{{ loop.index }} | ||
Title: {{ file.path }} | ||
Content: | ||
``` | ||
{{ file.content }} | ||
``` | ||
{% endfor %} | ||
{% endif %} | ||
{% if current_buffer_path %} | ||
Document:{{context_files | length + 1}} | ||
Title: {{ current_buffer_path }} | ||
{% endif %} | ||
{% if current_buffer_context %} | ||
Content: | ||
```{{ current_buffer_filetype }} | ||
{{ current_buffer_context }} | ||
``` | ||
{% endif %} | ||
{% if visual_selection %} | ||
Code: | ||
```{{ current_buffer_filetype }} | ||
{{ visual_selection }} | ||
``` | ||
|
||
{% if prefill %} | ||
INSTRUCTION: Replace the code in the block given above. ONLY return the valid code fragment surrounded by a code fence with backticks. | ||
{% else %} | ||
INSTRUCTION: Replace the code in the block given above. ONLY return the code fragment that is requested in the code snippet WITHOUT backticks. DO NOT surround the code fragment in backticks. | ||
{% endif %} | ||
{% endif %} | ||
QUERY: {{ user_query }} |