luogu 0.1.16 → 0.1.17

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: 9fc3971fa31ce1f405672f6093f5fe66b383aced4254d2fefebd562d54a5fcc9
4
- data.tar.gz: 14857af32922e9d59d71405d75f64fb36436dbd621ed955ec3acc6e3c9be50e1
3
+ metadata.gz: 5d9707e45c3c0e6db3a5e44c15e1cb7bc543ce12d79a2a0e072c85646ab0794d
4
+ data.tar.gz: 9cd4aad9bc2bcffd1e396fff4d1ef93815fe7e139103b86d1e1bf22c7016608f
5
5
  SHA512:
6
- metadata.gz: 7caaf61b33788dbfdae89c671b30ce7e86a5c312ed357b8615315e911fe023ef33659e7b26bafc8f9e8b98ee3e6c70b438a9037218835e42e144994f0355c5cc
7
- data.tar.gz: 26d1472f1e2029844274c6f2f9e0cb2940ef399e656a5eebd546b7c597037f852fee1f2a334158e0bc9caa2f2335a13ab0207f47f08b72215fffc658b0dc1739
6
+ metadata.gz: 1b268855fb1fc1f92205b7816915d4ce2d98a75d34ac83c194992a714c37462bc826a3b18f1303cc93eb94c1707d475b0c3d0ecdc567c35f20ba6a3fbe3ef279
7
+ data.tar.gz: 2c3fd1342b6ec0ba3e52fd3df21d5b8d19d1be95f20f99e0498e8f25da7be709f9e0d7591435bf06abd4dd0fa89725574c7089ec97e73c38d33e4f87b09c6670
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- luogu (0.1.15)
4
+ luogu (0.1.16)
5
5
  dotenv (~> 2.8, >= 2.8.1)
6
6
  dry-cli (~> 1.0)
7
7
  http (~> 5.1, >= 5.1.1)
@@ -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.create_messages([
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Luogu
4
- VERSION = "0.1.16"
4
+ VERSION = "0.1.17"
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.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - MJ