luogu 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/luogu/agent_runner.rb +3 -7
- data/lib/luogu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5d9707e45c3c0e6db3a5e44c15e1cb7bc543ce12d79a2a0e072c85646ab0794d
|
|
4
|
+
data.tar.gz: 9cd4aad9bc2bcffd1e396fff4d1ef93815fe7e139103b86d1e1bf22c7016608f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b268855fb1fc1f92205b7816915d4ce2d98a75d34ac83c194992a714c37462bc826a3b18f1303cc93eb94c1707d475b0c3d0ecdc567c35f20ba6a3fbe3ef279
|
|
7
|
+
data.tar.gz: 2c3fd1342b6ec0ba3e52fd3df21d5b8d19d1be95f20f99e0498e8f25da7be709f9e0d7591435bf06abd4dd0fa89725574c7089ec97e73c38d33e4f87b09c6670
|
data/Gemfile.lock
CHANGED
data/lib/luogu/agent_runner.rb
CHANGED
|
@@ -110,7 +110,7 @@ module Luogu
|
|
|
110
110
|
if answer = self.find_and_save_final_answer(content)
|
|
111
111
|
logger.info "finnal answer: #{answer}"
|
|
112
112
|
elsif content.is_a?(Array)
|
|
113
|
-
self.run_agents(content)
|
|
113
|
+
self.run_agents(content, messages)
|
|
114
114
|
end
|
|
115
115
|
end
|
|
116
116
|
|
|
@@ -120,7 +120,7 @@ module Luogu
|
|
|
120
120
|
self.request_chat(messages)
|
|
121
121
|
end
|
|
122
122
|
|
|
123
|
-
def run_agents(agents)
|
|
123
|
+
def run_agents(agents, _messages_)
|
|
124
124
|
if answer = self.find_and_save_final_answer(agents)
|
|
125
125
|
logger.info "finnal answer: #{answer}"
|
|
126
126
|
return
|
|
@@ -132,11 +132,7 @@ module Luogu
|
|
|
132
132
|
response = agent_class.new.call(agent['action_input'])
|
|
133
133
|
@tools_response << {name: agent['action'], response: response}
|
|
134
134
|
end
|
|
135
|
-
messages = self.
|
|
136
|
-
{role: "user", content: self.user_input_prompt_template},
|
|
137
|
-
{role: "assistant", content: agents.to_json},
|
|
138
|
-
{role: "user", content: self.tools_response_prompt_template},
|
|
139
|
-
])
|
|
135
|
+
messages = _messages_ + [{role: "assistant", content: agents.to_json}, {role: "user", content: self.tools_response_prompt_template}]
|
|
140
136
|
self.request_chat messages
|
|
141
137
|
end
|
|
142
138
|
|
data/lib/luogu/version.rb
CHANGED