luo 0.1.23 → 0.1.25

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: 86dbccd9a0a001b6dde132666ad444d748417dd4eeedf1a9b150160a0609e93c
4
- data.tar.gz: 638296ce0a26c8471b6a005e74b897221415aa392fb65f47585a75898801992e
3
+ metadata.gz: 12601aff9972b8acace601e1fd79ed219577d8063379f0c2c8677c6af24a731b
4
+ data.tar.gz: ae7ccf1bed46c7ff1eeea7328a034b6557674f4fc1c2df5135ead23f4eb5fa70
5
5
  SHA512:
6
- metadata.gz: 8838f0489d34c03b8927d60fb9d527ab0653d1ce00d35b2f8fd5020f4183d6abfda24e7ef8fa81517dff8b31410817d9e0b813ac5507bff4d1aaa63809583e2d
7
- data.tar.gz: 045d43cc7a1f0d2bb41e68ea36d5e07ce2b5da84c46daadef05054fb9a73269bbbe13b458ac9242c53075ca42f37bc0717a37fe792165c87eca60da71c1d9596
6
+ metadata.gz: 79bf668ce8fbef426bc81409e159401a9eb301d38dadb9e3b5af21dd913477e47ef873cab930caebdc51e50ef84c2976d1bf43cb8e82db7746ad66df6deaddc0
7
+ data.tar.gz: c6d75bba67f02b51c4a99e38a9651687534e947cb0bed38b49534691d5c5a1a23e8a7ee80ba328bd579f21a72c12acec825858c986949cdb0fe95577daa97989
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- luo (0.1.22)
4
+ luo (0.1.25)
5
5
  dotenv (~> 2.8, >= 2.8.1)
6
6
  dry-cli (~> 1.0)
7
7
  dry-configurable (~> 1.0, >= 1.0.1)
data/lib/luo/open_ai.rb CHANGED
@@ -8,6 +8,7 @@ module Luo
8
8
  setting :retries, default: ENV.fetch('OPENAI_REQUEST_RETRIES', 3).to_i
9
9
  setting :host, default: ENV.fetch('OPENAI_HOST', 'https://api.openai.com')
10
10
  setting :temperature, default: ENV.fetch('OPENAI_TEMPERATURE', 1).to_i
11
+ setting :model, default: ENV.fetch('OPENAI_CHAT_MODEL', 'gpt-3.5-turbo')
11
12
 
12
13
  include HttpClient.init_client
13
14
 
@@ -53,7 +54,7 @@ module Luo
53
54
  messages = messages.to_a
54
55
  end
55
56
  params = PARAMS.call(
56
- model: 'gpt-3.5-turbo',
57
+ model: config.model,
57
58
  temperature: temperature || config.temperature,
58
59
  messages: messages
59
60
  )
data/lib/luo/projects/env CHANGED
@@ -3,4 +3,5 @@ OPENAI_TEMPERATURE=0 # OpenAI的温度
3
3
  OPENAI_LIMIT_HISTORY=6 # OpenAI的历史记录长度
4
4
  AIUI_APP_KEY= # AIUI的AppKey
5
5
  AIUI_APP_ID= # AIUI的AppID
6
- XINGHUO_ACCESS_TOKEN= # 星火的访问令牌
6
+ XINGHUO_ACCESS_TOKEN= # 星火的访问令牌
7
+ OPENAI_CHAT_MODEL=gpt-3.5-turbo
data/lib/luo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Luo
4
- VERSION = "0.1.23"
4
+ VERSION = "0.1.25"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.23
4
+ version: 0.1.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - MJ
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-15 00:00:00.000000000 Z
11
+ date: 2023-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk