Skip to content

Commit ad2ec81

Browse files
committed
Update README.md
1 parent 13042c9 commit ad2ec81

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ go clean -testcache; go test ./...
5858
```
5959

6060
## Example configuration
61+
62+
The following configuration will include the original text as well as the translated text:
63+
6164
```json
6265
{
6366
"Model": "mistral",
@@ -67,3 +70,16 @@ go clean -testcache; go test ./...
6770
}
6871
```
6972

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}'",
83+
"Template": "{GENERATED_TEXT}"
84+
}
85+
```

0 commit comments

Comments
 (0)