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 +4 -4
- data/lib/luogu/prompt_parser.rb +3 -4
- data/lib/luogu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b16f3080badfbe3a83427b1e7e2c13f60fdeebaa758a3009beb6fb88d81995b1
|
4
|
+
data.tar.gz: b270f3adb7cebb3f5391ef88aa1fd331a355465da5a861071a7b060f8c989955
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 850096cb88ea2764db10802b13047443aaa81f9e4343d671a02d386abcebcfab1581a1a90453566eef7bb3eae5a49198d966029d7fc59143b62d1bc4e96f8b58
|
7
|
+
data.tar.gz: f9847779776839a7dff96e75cf7e7d932510c4700d01c8c77e8e91f1d3b4321afa01af3bac943aa7bf2f2580a05c77779818b0a5d9df965ed5280f1197ef9f64
|
data/lib/luogu/prompt_parser.rb
CHANGED
@@ -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
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.
|
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-
|
11
|
+
date: 2023-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-openai
|