You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,9 @@ go clean -testcache; go test ./...
58
58
```
59
59
60
60
## Example configuration
61
+
62
+
The following configuration will include the original text as well as the translated text:
63
+
61
64
```json
62
65
{
63
66
"Model": "mistral",
@@ -67,3 +70,16 @@ go clean -testcache; go test ./...
67
70
}
68
71
```
69
72
73
+
If you only want to include the translation you can change the `Template` to `"Template": "{GENERATED_TEXT}"`.
74
+
75
+
For some subtitles, it can be useful to include context from the previous line.
76
+
Here’s an example configuration that does this:
77
+
78
+
```json
79
+
{
80
+
"Model": "deepseek-r1:8b",
81
+
"PropertyName": "translated_text",
82
+
"Prompt": "Consider the previous text for context ONLY: '{PREVIOUS_TEXT} {TEXT}'. Translate this to english and keep it short, and don't include the context in your response: '{TEXT}'",
0 commit comments