yegor256 / jekyll-chatgpt-translate

Automated translating of Jekyll pages via ChatGPT: all you need is just an OpenAI API key
https://rubygems.org/gems/jekyll-chatgpt-translate
MIT License
15 stars 1 forks source link

in 'production' mode downloaded pages are deleted #29

Closed yegor256 closed 1 year ago

yegor256 commented 1 year ago

@rultor release, tag is 0.0.22

rultor commented 1 year ago

@rultor release, tag is 0.0.22

@yegor256 OK, I will release it now. Please check the progress here

rultor commented 1 year ago

@rultor release, tag is 0.0.22

@yegor256 Oops, I failed. You can see the full log here (spent 2min)

.....No need to translate from "xx" to "xx": "This text should not be sent to OpenAI" 
.No need to translate from "xx" to "xx": "```\ntest\n```" 
./usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/net/http/generic_request.rb:46: warning: net/http: nil HTTP header: OpenAI-Organization
ChatGPT prompt: "Please, translate the following Markdown paragraph from English to Russian, don't translate technical terms and proper nouns:\n\nThis is the text to send to OpenAI", ChatGPT answer: "boom!" 
Translated 8 EN words to 1 RU words through gpt-3.5-turbo in 0.01s: "This is the text to send ..." 
.No need to translate from "xx" to "xx": "How are you, my friend?" 
No need to translate from "xx" to "xx": "Read this Java code:" 
No need to translate from "xx" to "xx": "```\n      System.out.println(\"Hello, dude!\");\n      System.out.println(\"Good bye!\");\n      System.out.println(\"Done!\");\n      ```" 
No need to translate from "xx" to "xx": "This is it." 
.No need to translate from "xx" to "xx": "Hello, world!" 
.No need to translate from "xx" to "xx": "<img src=\"a\"/>" 
.

Finished in 0.066861s, 433.7380 runs/s, 643.1287 assertions/s.

  1) Error:
GptTranslate::PingTest#test_wrong_address:
Errno::EADDRNOTAVAIL: Failed to open TCP connection to localhost:1 (Cannot assign requested address - connect(2) for "localhost" port 1)
    /usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/net/http.rb:987:in `initialize'
    /usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/net/http.rb:987:in `open'
    /usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/net/http.rb:987:in `block in connect'
    /usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/timeout.rb:97:in `block in timeout'
    /usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/timeout.rb:107:in `timeout'
    /usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/net/http.rb:985:in `connect'
    /usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/net/http.rb:970:in `do_start'
    /usr/local/rvm/gems/ruby-3.0.1/gems/webmock-3.18.1/lib/webmock/http_lib_adapters/net_http.rb:129:in `ensure_actual_connection'
    /usr/local/rvm/gems/ruby-3.0.1/gems/webmock-3.18.1/lib/webmock/http_lib_adapters/net_http.rb:96:in `request'
    /usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/net/http.rb:1422:in `request_get'
    /usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/net/http.rb:498:in `block in get_response'
    /usr/local/rvm/gems/ruby-3.0.1/gems/webmock-3.18.1/lib/webmock/http_lib_adapters/net_http.rb:114:in `start_without_connect'
    /usr/local/rvm/gems/ruby-3.0.1/gems/webmock-3.18.1/lib/webmock/http_lib_adapters/net_http.rb:141:in `start'
    /usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/net/http.rb:621:in `start'
    /usr/local/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/net/http.rb:496:in `get_response'
    /home/r/repo/lib/jekyll-chatgpt-translate/ping.rb:56:in `found?'
    /home/r/repo/test/test_ping.rb:57:in `test_wrong_address'

29 runs, 43 assertions, 0 failures, 1 errors, 0 skips
Coverage report generated for Unit Tests to /home/r/repo/coverage. 338 / 366 LOC (92.35%) covered.
rake aborted!
Command failed with status (1)
/usr/local/rvm/gems/ruby-3.0.1/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/lib/bundler/cli.rb:486:in `exec'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/lib/bundler/cli.rb:31:in `dispatch'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/lib/bundler/cli.rb:25:in `start'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/exe/bundle:48:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
/usr/local/rvm/gems/ruby-3.0.1/gems/bundler-2.3.26/exe/bundle:36:in `<top (required)>'
/usr/local/rvm/gems/ruby-3.0.1/bin/bundle:23:in `load'
/usr/local/rvm/gems/ruby-3.0.1/bin/bundle:23:in `<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
container c35e0d5306072c8c6bdc95ccea7e6722433f9743c74710152cddf039612956a2 is dead
Wed 23 Aug 2023 03:44:57 PM CEST
yegor256 commented 1 year ago

@rultor release, tag is 0.0.22

rultor commented 1 year ago

@rultor release, tag is 0.0.22

@yegor256 OK, I will release it now. Please check the progress here

rultor commented 1 year ago

@rultor release, tag is 0.0.22

@yegor256 Done! FYI, the full log is here (took me 2min)