luogu 0.1.11 → 0.1.13

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: 6fe743a8d25cfb2bd189727b99b889fa41d3c4a770b75350dc7da72b11915198
4
- data.tar.gz: 951e6cb7340553cdf51a9ef74a160774f354fb66f9eebeaded7e96c326118096
3
+ metadata.gz: b16f3080badfbe3a83427b1e7e2c13f60fdeebaa758a3009beb6fb88d81995b1
4
+ data.tar.gz: b270f3adb7cebb3f5391ef88aa1fd331a355465da5a861071a7b060f8c989955
5
5
  SHA512:
6
- metadata.gz: 501920c17b82fc2de7678c16c9688f95a112d61d633025af0a9fcbbf9ab52dd47a71e1b666bee0e3d3c725c41d67f1262c5a2d8f2833e94c21e58b9d38956a15
7
- data.tar.gz: afdbe6c180a29db054c2d818ab71bcf441cd2c41e65310d6df5d6c4575fb16a9d57e89c718f7b8c41a35ac5c7ac96bbb5a8fcd0e37f67092ba135243a08dcc9f
6
+ metadata.gz: 850096cb88ea2764db10802b13047443aaa81f9e4343d671a02d386abcebcfab1581a1a90453566eef7bb3eae5a49198d966029d7fc59143b62d1bc4e96f8b58
7
+ data.tar.gz: f9847779776839a7dff96e75cf7e7d932510c4700d01c8c77e8e91f1d3b4321afa01af3bac943aa7bf2f2580a05c77779818b0a5d9df965ed5280f1197ef9f64
@@ -1,6 +1,6 @@
1
1
  module Luogu
2
2
  class PromptParser
3
- attr_reader :ruby_code, :ruby_code_line, :file_path
3
+ attr_reader :ruby_code, :ruby_code_line, :file_path, :messages
4
4
  def initialize(file_path)
5
5
  @file_path = file_path
6
6
  @messages = []
@@ -9,7 +9,7 @@ module Luogu
9
9
  end
10
10
 
11
11
  def render
12
- process_file
12
+ process_file if @messages.size == 0
13
13
  @messages
14
14
  end
15
15
 
@@ -17,9 +17,8 @@ module Luogu
17
17
  JSON.pretty_generate self.render
18
18
  end
19
19
 
20
- private
21
20
  def process_file
22
- @messages = []
21
+ @messages = []
23
22
  file = File.read(@file_path)
24
23
 
25
24
  if file =~ /@callback/
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.11"
4
+ VERSION = "0.1.13"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luogu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - MJ
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-12 00:00:00.000000000 Z
11
+ date: 2023-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-openai