immosquare-yaml 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0dac9c00ae705f9f467cd18ccb917484caf63a422e06ef344846dafdc52d1f5a
4
- data.tar.gz: 5bde31fc5ab408e67f619e53762fb5da22f85fc61d49e9db56dcb3eb75115b77
3
+ metadata.gz: 0f1f9627fc2ca94a23182daf83ee3e7c4a91af11c49c2e3bfd2609544529af2e
4
+ data.tar.gz: bb4d7754edf9d2a5abc772945f977edf07be27f24c1dce0c6711f63ca0186b80
5
5
  SHA512:
6
- metadata.gz: edebdc23ec566c33ca1310086e9934290057ae007c0a3898e9d501d02253a5ff0832848e0b24e48755d9c3475399e18bee5ce7c0a36386cc0a79e389e026fc94
7
- data.tar.gz: 18d233c88da27c163b285c08da55fd0306b49500e13199d0e0eda8d2c41a671659496e9c52681ed0c842a1d64f34ba3415b3671dbf2e1bf030024c5f69c71b94
6
+ metadata.gz: bc931d730c8d64bdc0ea1af178317808e9b336b05b09fc2f06f07b5d08456a894fa22aa9765daca109abab45985dcde53f0c77af85e1410206862100a40066cf
7
+ data.tar.gz: 899a6c85464b7b37a3e1fd04e7dbd0a22fe1bd8e26d30570d37717b82087525a17135bad008c3a9a17081bed7b0354bec90fc41a43e5c7fcc4f56e52df31b7e2
@@ -248,13 +248,13 @@ module ImmosquareYaml
248
248
  ##============================================================##
249
249
  ## Loop
250
250
  ##============================================================##
251
- puts("fields to translate : #{data_open_ai.size}#{" by group of #{group_size}" if data_open_ai.size > group_size}")
251
+ puts("fields to translate from #{from_iso} (#{from}) to #{to_iso} (#{to}) : #{data_open_ai.size}#{" by group of #{group_size}" if data_open_ai.size > group_size}")
252
252
  while index < data_open_ai.size
253
253
  data_group = data_open_ai[index, group_size]
254
254
 
255
255
 
256
256
  begin
257
- puts("call OPENAI Api (with model #{model[:name]}) #{" for #{data_group.size} fields" if data_open_ai.size > group_size}")
257
+ puts("call OPENAI Api (with model #{model[:name]}) #{" for #{data_group.size} fields (#{index}-#{index+data_group.size})" if data_open_ai.size > group_size}")
258
258
  prompt = "#{prompt_init}:\n\n#{data_group.inspect}\n\n"
259
259
  body = {
260
260
  :model => model[:name],
@@ -265,7 +265,7 @@ module ImmosquareYaml
265
265
  :temperature => 0.0
266
266
  }
267
267
  t0 = Time.now
268
- call = HTTParty.post("https://api.openai.com/v1/chat/completions", :body => body.to_json, :headers => headers, :timeout => 240)
268
+ call = HTTParty.post("https://api.openai.com/v1/chat/completions", :body => body.to_json, :headers => headers, :timeout => 500)
269
269
 
270
270
  puts("responded in #{(Time.now - t0).round(2)} seconds")
271
271
  raise(call["error"]["message"]) if call.code != 200
@@ -1,3 +1,3 @@
1
1
  module ImmosquareYaml
2
- VERSION = "0.1.7".freeze
2
+ VERSION = "0.1.8".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immosquare-yaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - IMMO SQUARE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-25 00:00:00.000000000 Z
11
+ date: 2023-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639