Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show_billed_characters not returned in response #10

Open
leoplct opened this issue Feb 6, 2025 · 0 comments
Open

show_billed_characters not returned in response #10

leoplct opened this issue Feb 6, 2025 · 0 comments

Comments

@leoplct
Copy link

leoplct commented Feb 6, 2025

DeepL.translate("<head><title>Ciao</title></head>", "IT", "EN", show_billed_characters: true, tag_handling: 'html').as_json

The returned response do not have the number of billed characters (API docs).

{"request"=>
  {"authorization"=>["DeepL-Auth-Key xxxxxx:fx"],
   "user-agent"=>["deepl-ruby/3.0.2 (darwin23) ruby/3.3.1"],
   "content-type"=>["application/json"],
   "accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],
   "accept"=>["*/*"],
   "connection"=>["close"],
   "host"=>["api-free.deepl.com"],
   "content-length"=>["175"]},
 "response"=>
  {"date"=>["Thu, 06 Feb 2025 15:04:32 GMT"],
   "content-type"=>["application/json"],
   "transfer-encoding"=>["chunked"],
   "vary"=>["Accept-Encoding"],
   "access-control-allow-origin"=>["*"],
   "strict-transport-security"=>["max-age=63072000; includeSubDomains; preload"],
   "server-timing"=>["l7_lb_tls;dur=165, l7_lb_idle;dur=6, l7_lb_receive;dur=0, l7_lb_total;dur=271"],
   "access-control-expose-headers"=>["Server-Timing, X-Trace-ID"],
   "x-trace-id"=>["5167a3dfe17c4b90bef0da45a01a17d7"],
   "connection"=>["close"]},
 "text"=>"<head><title>Hi</title></head>",
 "detected_source_language"=>"IT",
 "model_type_used"=>nil}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant