-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify GPTMDT prompt to preserve source code and re-translate two aff…
…ected files
- Loading branch information
1 parent
83667b8
commit 220394f
Showing
4 changed files
with
528 additions
and
429 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 |
---|---|---|
|
@@ -5,5 +5,4 @@ book/ | |
.DS_Store | ||
target | ||
tmp | ||
result | ||
gptmdt_settings.toml | ||
result |
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,38 @@ | ||
# We use the GPT-4 model in order to be able to reliably use the ignorelist below | ||
gptmodel = "gpt-4" | ||
|
||
# The default prompt with an additional clause to avoid getting the source code (or examples' output) translated | ||
sysprompt = "You shall translate the following markdown to Italian, preserving the existing formatting and avoiding any other output. Please refrain from translating anything inside a Markdown source code box." | ||
|
||
# List of domain-specific terms that GPT shouldn't translate | ||
ignorelist = [ | ||
"Ownership", | ||
"Borrowing", | ||
"Lifetime", | ||
"Trait", | ||
"Struct", | ||
"Enum", | ||
"Match", | ||
"Option", | ||
"Result", | ||
"Crate", | ||
"Module", | ||
"Cargo", | ||
"Slice", | ||
"Iterator", | ||
"Closure", | ||
"Mutable", | ||
"Immutable", | ||
"Reference", | ||
"Borrow Checker", | ||
"Concurrency", | ||
"Mutex", | ||
"Atomic", | ||
"Async", | ||
"Smart Pointer" | ||
] | ||
|
||
# PLEASE NOTE: The OpenAI API key isn't saved here for obvious reasons and you should | ||
# never commit this file in case you edit it into. | ||
# To pass the API key to the program please run it with the following | ||
# syntax: "GPTMDT_OPENAITOKEN=... gpt_md_translator ..." |
Oops, something went wrong.