Skip to content

Commit

Permalink
#63 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Nov 17, 2023
1 parent df3e480 commit 0cde315
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions features/cli.feature
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Feature: Simple site building
source: en
version: ""
api_key: "it-is-not-used, because EN to EN translation"
window_length: 1024
layout: should-not-be-used
targets:
-
Expand Down
6 changes: 5 additions & 1 deletion lib/jekyll-chatgpt-translate/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ def generate(site)
config['source'] || 'en',
lang
)
foreign = gpt.translate(plain, min: min_chars, window_length: config['window_length'] || '2048')
foreign = gpt.translate(
plain,
min: min_chars,
window_length: (config['window_length'] || '2048').to_i
)
File.write(
path,
[
Expand Down

0 comments on commit 0cde315

Please sign in to comment.