luogu 0.1.14 → 0.1.15

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: e5932a14c78478ce16a36f5cfd141834e9f677c90ddd7c398e8cdcbb66bd1ea4
4
- data.tar.gz: a870afd3b6808cf89f01695a47b57c03ea906bf7b59e6b66bb28246a93215fac
3
+ metadata.gz: 24aa02351d1ee83fba59602c92fdd36f89f9ee32448047d183f44c349bf2a91a
4
+ data.tar.gz: e910f65bdce3c8b083a74769d4fa9c7e01220840fcbb2c22c3c0758043313aa6
5
5
  SHA512:
6
- metadata.gz: c5e59722ac54f8a247853bd67161297eae0976a6d402819ea4a774460f3ab4d2a5758c5511b9a4758747e5a1df93f760e7ad3f5084c395c5efe496f4d4abf17f
7
- data.tar.gz: 5f69526dfc2f0b56f91daac355575703b0f6389ed889584663510598bf0f0fb5b6a53f95ccd7344656f621e0ec36b629c2d7c8009ffe9e07aa89b5a0b678a59d
6
+ metadata.gz: a2f7485e0756122f2ff55b43294e319617238bbc085872d85836631832b82f24278e8d2961ec78e10c25fd80fb89ed0d3352e1d7594202ea3ca121b346f1bee3
7
+ data.tar.gz: f4ccd674de1f70c894d78861bf2c9799a6052eef5c0a4579dae3f7d8cde6572f2e1bda2c69b4ce054070ffbcec2d6e82e6a8003c3557485034989b785d35e5be
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  用来开发 prompt 工程的工具
5
5
 
6
6
  ### 更新记录
7
- - 0.1.14 讲http库替换成HTTP.rb并且加入了重试机制,默认为3次,可通过设置环境变量 OPENAI_REQUEST_RETRIES 来设置次数
7
+ - 0.1.15 讲http库替换成HTTP.rb并且加入了重试机制,默认为3次,可通过设置环境变量 OPENAI_REQUEST_RETRIES 来设置次数
8
8
 
9
9
  ### 安装
10
10
  - 安装ruby,要求2.6以上,Mac自带不需要再安装
data/lib/luogu/chatgpt.rb CHANGED
@@ -41,10 +41,10 @@ module Luogu
41
41
  @context.request_params = params
42
42
  params = @plugin.before_request_proc.call(self, @context).request_params
43
43
  end
44
- response = client.chat(parameters: params)
44
+ response = client.chat(parameters: params).parse
45
45
  @context.response = response
46
46
  @plugin.after_request_proc.call(self, @context) if @plugin.after_request_proc
47
- response.parse.dig("choices", 0, "message", "content")
47
+ response.dig("choices", 0, "message", "content")
48
48
  end
49
49
 
50
50
  def chat(user_message)
data/lib/luogu/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Luogu
4
- VERSION = "0.1.14"
4
+ VERSION = "0.1.15"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luogu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - MJ