luo 0.1.24 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -3
  3. data/exe/luo +1 -1
  4. data/lib/luo/cli/init_app.rb +12 -0
  5. data/lib/luo/cli/init_base.rb +45 -0
  6. data/lib/luo/cli/init_notebook.rb +15 -0
  7. data/lib/luo/cli.rb +33 -49
  8. data/lib/luo/helpers.rb +8 -0
  9. data/lib/luo/{init_project.rb → init_project._rb} +1 -1
  10. data/lib/luo/marqo.rb +1 -1
  11. data/lib/luo/open_ai.rb +2 -1
  12. data/lib/luo/open_ai_agent_runner.rb +15 -4
  13. data/lib/luo/parser_markdown.rb +34 -0
  14. data/lib/luo/project_init.rb +9 -0
  15. data/lib/luo/prompt_template.rb +7 -3
  16. data/lib/luo/prompts.rb +30 -2
  17. data/lib/luo/version.rb +1 -1
  18. data/lib/luo/xinghuo.rb +9 -8
  19. data/lib/luo/xinghuo_agent_runner.rb +7 -3
  20. data/lib/luo.rb +24 -2
  21. data/luo.gemspec +2 -1
  22. data/sig/luo/prompt_template.rbs +1 -1
  23. data/{lib/luo/projects → templates}/application.rb +5 -1
  24. data/{lib/luo/projects → templates}/env +2 -1
  25. data/templates/prompts/luo_error.md.erb +8 -0
  26. metadata +48 -46
  27. data/.idea/.gitignore +0 -8
  28. data/.idea/dictionaries/mj.xml +0 -7
  29. data/.idea/inspectionProfiles/Project_Default.xml +0 -9
  30. data/.idea/luo.iml +0 -81
  31. data/.idea/misc.xml +0 -4
  32. data/.idea/modules.xml +0 -8
  33. data/.idea/vcs.xml +0 -6
  34. data/init.rb +0 -16
  35. data/lib/luo/templates/agent_input.md.erb +0 -39
  36. data/lib/luo/templates/agent_system.md.erb +0 -4
  37. data/lib/luo/templates/agent_tool_input.md.erb +0 -10
  38. data/lib/luo/templates/demo.md.erb +0 -1
  39. data/lib/luo/templates/luo_xinghuo_agent_tool_input.md.erb +0 -16
  40. data/lib/luo/templates/xinghuo_agent_input.md.erb +0 -10
  41. data/lib/luo/templates/xinghuo_response_error.md.erb +0 -10
  42. data/luo.ipynb +0 -84
  43. data/templates/luo_agent_input.md.erb +0 -39
  44. data/templates/luo_agent_system.md.erb +0 -4
  45. data/templates/luo_agent_tool_input.md.erb +0 -10
  46. data/templates/luo_commit.md.erb +0 -2
  47. data/templates/luo_xinghuo_agent_input.md.erb +0 -10
  48. data/templates/luo_xinghuo_agent_tool_input.md.erb +0 -16
  49. data/templates/luo_xinghuo_response_error.md.erb +0 -10
  50. data/templates/prompt.demo.erb +0 -1
  51. /data/{lib/luo/projects → templates}/init.rb +0 -0
  52. /data/{lib/luo/projects → templates}/luo.ipynb +0 -0
  53. /data/{lib/luo/projects → templates}/prompts/agent_input.md.erb +0 -0
  54. /data/{lib/luo/projects → templates}/prompts/agent_system.md.erb +0 -0
  55. /data/{lib/luo/projects → templates}/prompts/agent_tool_input.md.erb +0 -0
  56. /data/{lib/luo/templates → templates/prompts}/luo_commit.md.erb +0 -0
  57. /data/{lib/luo/projects → templates}/prompts/xinghuo_agent_input.md.erb +0 -0
  58. /data/{lib/luo/projects → templates}/prompts/xinghuo_response_error.md.erb +0 -0
  59. /data/{lib/luo/projects → templates}/test.yml +0 -0
  60. /data/{lib/luo/projects → templates}/time_agent.rb +0 -0
  61. /data/{lib/luo/projects → templates}/weather_agent.rb +0 -0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.24
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MJ
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-15 00:00:00.000000000 Z
11
+ date: 2023-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk
@@ -125,33 +125,53 @@ dependencies:
125
125
  - !ruby/object:Gem::Version
126
126
  version: 1.0.1
127
127
  - !ruby/object:Gem::Dependency
128
- name: dry-cli
128
+ name: tty-markdown
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - "~>"
132
132
  - !ruby/object:Gem::Version
133
- version: '1.0'
133
+ version: 0.7.2
134
134
  type: :runtime
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - "~>"
139
139
  - !ruby/object:Gem::Version
140
- version: '1.0'
140
+ version: 0.7.2
141
141
  - !ruby/object:Gem::Dependency
142
- name: tty-markdown
142
+ name: redcarpet
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - "~>"
146
146
  - !ruby/object:Gem::Version
147
- version: 0.7.2
147
+ version: '3.6'
148
148
  type: :runtime
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - "~>"
153
153
  - !ruby/object:Gem::Version
154
- version: 0.7.2
154
+ version: '3.6'
155
+ - !ruby/object:Gem::Dependency
156
+ name: thor
157
+ requirement: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - "~>"
160
+ - !ruby/object:Gem::Version
161
+ version: '1.2'
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: 1.2.2
165
+ type: :runtime
166
+ prerelease: false
167
+ version_requirements: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - "~>"
170
+ - !ruby/object:Gem::Version
171
+ version: '1.2'
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: 1.2.2
155
175
  - !ruby/object:Gem::Dependency
156
176
  name: rspec
157
177
  requirement: !ruby/object:Gem::Requirement
@@ -174,13 +194,6 @@ executables:
174
194
  extensions: []
175
195
  extra_rdoc_files: []
176
196
  files:
177
- - ".idea/.gitignore"
178
- - ".idea/dictionaries/mj.xml"
179
- - ".idea/inspectionProfiles/Project_Default.xml"
180
- - ".idea/luo.iml"
181
- - ".idea/misc.xml"
182
- - ".idea/modules.xml"
183
- - ".idea/vcs.xml"
184
197
  - ".rspec"
185
198
  - Dockerfile
186
199
  - Gemfile
@@ -190,51 +203,34 @@ files:
190
203
  - Rakefile
191
204
  - docker-compose.yml
192
205
  - exe/luo
193
- - init.rb
194
206
  - lib/luo.rb
195
207
  - lib/luo/agent.rb
196
208
  - lib/luo/agent_runner_base.rb
197
209
  - lib/luo/agent_runner_context.rb
198
210
  - lib/luo/aiui.rb
199
211
  - lib/luo/cli.rb
212
+ - lib/luo/cli/init_app.rb
213
+ - lib/luo/cli/init_base.rb
214
+ - lib/luo/cli/init_notebook.rb
200
215
  - lib/luo/configurable.rb
201
216
  - lib/luo/helpers.rb
202
217
  - lib/luo/http_client.rb
203
- - lib/luo/init_project.rb
218
+ - lib/luo/init_project._rb
204
219
  - lib/luo/loader.rb
205
220
  - lib/luo/marqo.rb
206
221
  - lib/luo/memory_history.rb
207
222
  - lib/luo/messages.rb
208
223
  - lib/luo/open_ai.rb
209
224
  - lib/luo/open_ai_agent_runner.rb
210
- - lib/luo/projects/application.rb
211
- - lib/luo/projects/env
212
- - lib/luo/projects/init.rb
213
- - lib/luo/projects/luo.ipynb
214
- - lib/luo/projects/prompts/agent_input.md.erb
215
- - lib/luo/projects/prompts/agent_system.md.erb
216
- - lib/luo/projects/prompts/agent_tool_input.md.erb
217
- - lib/luo/projects/prompts/xinghuo_agent_input.md.erb
218
- - lib/luo/projects/prompts/xinghuo_response_error.md.erb
219
- - lib/luo/projects/test.yml
220
- - lib/luo/projects/time_agent.rb
221
- - lib/luo/projects/weather_agent.rb
225
+ - lib/luo/parser_markdown.rb
226
+ - lib/luo/project_init.rb
222
227
  - lib/luo/prompt_template.rb
223
228
  - lib/luo/prompts.rb
224
- - lib/luo/templates/agent_input.md.erb
225
- - lib/luo/templates/agent_system.md.erb
226
- - lib/luo/templates/agent_tool_input.md.erb
227
- - lib/luo/templates/demo.md.erb
228
- - lib/luo/templates/luo_commit.md.erb
229
- - lib/luo/templates/luo_xinghuo_agent_tool_input.md.erb
230
- - lib/luo/templates/xinghuo_agent_input.md.erb
231
- - lib/luo/templates/xinghuo_response_error.md.erb
232
229
  - lib/luo/version.rb
233
230
  - lib/luo/xinghuo.rb
234
231
  - lib/luo/xinghuo_agent_runner.rb
235
232
  - luo
236
233
  - luo.gemspec
237
- - luo.ipynb
238
234
  - luo.ps1
239
235
  - sig/luo.rbs
240
236
  - sig/luo/agent.rbs
@@ -252,14 +248,20 @@ files:
252
248
  - sig/luo/prompt_template.rbs
253
249
  - sig/luo/prompts.rbs
254
250
  - sig/luo/xinghuo.rbs
255
- - templates/luo_agent_input.md.erb
256
- - templates/luo_agent_system.md.erb
257
- - templates/luo_agent_tool_input.md.erb
258
- - templates/luo_commit.md.erb
259
- - templates/luo_xinghuo_agent_input.md.erb
260
- - templates/luo_xinghuo_agent_tool_input.md.erb
261
- - templates/luo_xinghuo_response_error.md.erb
262
- - templates/prompt.demo.erb
251
+ - templates/application.rb
252
+ - templates/env
253
+ - templates/init.rb
254
+ - templates/luo.ipynb
255
+ - templates/prompts/agent_input.md.erb
256
+ - templates/prompts/agent_system.md.erb
257
+ - templates/prompts/agent_tool_input.md.erb
258
+ - templates/prompts/luo_commit.md.erb
259
+ - templates/prompts/luo_error.md.erb
260
+ - templates/prompts/xinghuo_agent_input.md.erb
261
+ - templates/prompts/xinghuo_response_error.md.erb
262
+ - templates/test.yml
263
+ - templates/time_agent.rb
264
+ - templates/weather_agent.rb
263
265
  homepage: https://github.com/mjason/luo
264
266
  licenses: []
265
267
  metadata:
data/.idea/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- # Default ignored files
2
- /shelf/
3
- /workspace.xml
4
- # Editor-based HTTP Client requests
5
- /httpRequests/
6
- # Datasource local storage ignored files
7
- /dataSources/
8
- /dataSources.local.xml
@@ -1,7 +0,0 @@
1
- <component name="ProjectDictionaryState">
2
- <dictionary name="mj">
3
- <words>
4
- <w>marqo</w>
5
- </words>
6
- </dictionary>
7
- </component>
@@ -1,9 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="RubyClassVariableUsageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
5
- <inspection_tool class="RubyResolve" enabled="false" level="WARNING" enabled_by_default="false">
6
- <option name="warnImplicitResults" value="false" />
7
- </inspection_tool>
8
- </profile>
9
- </component>
data/.idea/luo.iml DELETED
@@ -1,81 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="RUBY_MODULE" version="4">
3
- <component name="ModuleRunConfigurationManager">
4
- <shared />
5
- </component>
6
- <component name="NewModuleRootManager">
7
- <content url="file://$MODULE_DIR$">
8
- <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
- <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
- <excludeFolder url="file://$MODULE_DIR$/bundle_gems/cache" />
12
- </content>
13
- <orderEntry type="jdk" jdkName="ruby-3.2.1-p31" jdkType="RUBY_SDK" />
14
- <orderEntry type="sourceFolder" forTests="false" />
15
- <orderEntry type="library" scope="PROVIDED" name="bundler (v2.4.6, ruby-3.2.1-p31) [gem]" level="application" />
16
- <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.2.2, ruby-3.2.1-p31) [gem]" level="application" />
17
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, ruby-3.2.1-p31) [gem]" level="application" />
18
- <orderEntry type="library" scope="PROVIDED" name="dotenv (v2.8.1, ruby-3.2.1-p31) [gem]" level="application" />
19
- <orderEntry type="library" scope="PROVIDED" name="dry-cli (v1.0.0, ruby-3.2.1-p31) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="dry-configurable (v1.0.1, ruby-3.2.1-p31) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="dry-core (v1.0.0, ruby-3.2.1-p31) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="dry-inflector (v1.0.0, ruby-3.2.1-p31) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="dry-initializer (v3.1.1, ruby-3.2.1-p31) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="dry-logic (v1.5.0, ruby-3.2.1-p31) [gem]" level="application" />
25
- <orderEntry type="library" scope="PROVIDED" name="dry-schema (v1.13.1, ruby-3.2.1-p31) [gem]" level="application" />
26
- <orderEntry type="library" scope="PROVIDED" name="dry-types (v1.7.1, ruby-3.2.1-p31) [gem]" level="application" />
27
- <orderEntry type="library" scope="PROVIDED" name="faraday (v2.7.4, ruby-3.2.1-p31) [gem]" level="application" />
28
- <orderEntry type="library" scope="PROVIDED" name="faraday-net_http (v3.0.2, ruby-3.2.1-p31) [gem]" level="application" />
29
- <orderEntry type="library" scope="PROVIDED" name="faraday-retry (v2.1.0, ruby-3.2.1-p31) [gem]" level="application" />
30
- <orderEntry type="library" scope="PROVIDED" name="kramdown (v2.4.0, ruby-3.2.1-p31) [gem]" level="application" />
31
- <orderEntry type="library" scope="PROVIDED" name="pastel (v0.8.0, ruby-3.2.1-p31) [gem]" level="application" />
32
- <orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, ruby-3.2.1-p31) [gem]" level="application" />
33
- <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, ruby-3.2.1-p31) [gem]" level="application" />
34
- <orderEntry type="library" scope="PROVIDED" name="rouge (v4.1.0, ruby-3.2.1-p31) [gem]" level="application" />
35
- <orderEntry type="library" scope="PROVIDED" name="rspec (v3.12.0, ruby-3.2.1-p31) [gem]" level="application" />
36
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.12.2, ruby-3.2.1-p31) [gem]" level="application" />
37
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.12.3, ruby-3.2.1-p31) [gem]" level="application" />
38
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.12.5, ruby-3.2.1-p31) [gem]" level="application" />
39
- <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.12.0, ruby-3.2.1-p31) [gem]" level="application" />
40
- <orderEntry type="library" scope="PROVIDED" name="strings (v0.2.1, ruby-3.2.1-p31) [gem]" level="application" />
41
- <orderEntry type="library" scope="PROVIDED" name="strings-ansi (v0.2.0, ruby-3.2.1-p31) [gem]" level="application" />
42
- <orderEntry type="library" scope="PROVIDED" name="tty-color (v0.6.0, ruby-3.2.1-p31) [gem]" level="application" />
43
- <orderEntry type="library" scope="PROVIDED" name="tty-markdown (v0.7.2, ruby-3.2.1-p31) [gem]" level="application" />
44
- <orderEntry type="library" scope="PROVIDED" name="tty-screen (v0.8.1, ruby-3.2.1-p31) [gem]" level="application" />
45
- <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.4.2, ruby-3.2.1-p31) [gem]" level="application" />
46
- <orderEntry type="library" scope="PROVIDED" name="unicode_utils (v1.4.0, ruby-3.2.1-p31) [gem]" level="application" />
47
- <orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.6.8, ruby-3.2.1-p31) [gem]" level="application" />
48
- </component>
49
- <component name="RakeTasksCache">
50
- <option name="myRootTask">
51
- <RakeTaskImpl id="rake">
52
- <subtasks>
53
- <RakeTaskImpl description="Build luo-0.1.4.gem into the pkg directory" fullCommand="build" id="build" />
54
- <RakeTaskImpl id="build">
55
- <subtasks>
56
- <RakeTaskImpl description="Generate SHA512 checksum if luo-0.1.4.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
57
- </subtasks>
58
- </RakeTaskImpl>
59
- <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
60
- <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
61
- <RakeTaskImpl description="Build and install luo-0.1.4.gem into system gems" fullCommand="install" id="install" />
62
- <RakeTaskImpl id="install">
63
- <subtasks>
64
- <RakeTaskImpl description="Build and install luo-0.1.4.gem into system gems without network access" fullCommand="install:local" id="local" />
65
- </subtasks>
66
- </RakeTaskImpl>
67
- <RakeTaskImpl description="Create tag v0.1.4 and build and push luo-0.1.4.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
68
- <RakeTaskImpl description="" fullCommand="default" id="default" />
69
- <RakeTaskImpl description="" fullCommand="release" id="release" />
70
- <RakeTaskImpl id="release">
71
- <subtasks>
72
- <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
73
- <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
74
- <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
75
- </subtasks>
76
- </RakeTaskImpl>
77
- </subtasks>
78
- </RakeTaskImpl>
79
- </option>
80
- </component>
81
- </module>
data/.idea/misc.xml DELETED
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" project-jdk-name="ruby-2.6.10-p210" project-jdk-type="RUBY_SDK" />
4
- </project>
data/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/luo.iml" filepath="$PROJECT_DIR$/.idea/luo.iml" />
6
- </modules>
7
- </component>
8
- </project>
data/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>
data/init.rb DELETED
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/setup"
4
- Bundler.require
5
-
6
- require 'luo'
7
- include Luo
8
-
9
- Loader.push_dir(File.join(__dir__, 'agents'))
10
- Loader.setup
11
-
12
- begin
13
- IRuby::Kernel.instance.switch_backend!(:pry)
14
- rescue => e
15
- #
16
- end
@@ -1,39 +0,0 @@
1
- TOOLS
2
- ------
3
- Assistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:
4
-
5
- <% agents.values.each do |agent| -%>
6
- > <%= agent.agent_name %>: <%= agent.agent_desc %>
7
- <% end -%>
8
-
9
- RESPONSE FORMAT INSTRUCTIONS
10
- ----------------------------
11
-
12
- When responding to me please, please output a response in one of two formats:
13
-
14
- **Option 1:**
15
- Use this if you want humans to use the tools.
16
- Markdown code snippet formatted in the following schema:
17
-
18
- ```json
19
- [{
20
- "action": string \ The action to take. Must be one of <%= agents.values.map do |a| a.agent_name end.join(', ') %>
21
- "action_input": string \ The input to the action
22
- }]
23
- ```
24
-
25
- **Option #2:**
26
- Use this if you want to respond directly to the human. Markdown code snippet formatted in the following schema:
27
-
28
- ```json
29
- {
30
- "action": "Final Answer",
31
- "action_input": string \ You should put what you want to return to use here <%= Luo::AgentRunnerBase.language_info %>
32
- }
33
- ```
34
-
35
- USER'S INPUT
36
- --------------------
37
- Here is the user's input (Remember to respond to a single or multiple actions with a json blob of markdown code snippets, and NOTHING else):
38
-
39
- <%= last_user_input %>
@@ -1,4 +0,0 @@
1
- Assistant is a large language model trained by OpenAI.
2
- Assistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.
3
- Assistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.
4
- Overall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.
@@ -1,10 +0,0 @@
1
- TOOL RESPONSE:
2
- ---------------------
3
- <% tools_response.each do |r| -%>
4
- > <%= r[:agent_name] %>: <%= r[:agent_response] %>
5
- <% end -%>
6
-
7
- USER'S INPUT
8
- --------------------
9
-
10
- Okay, so what is the response to my last comment? If using information obtained from the tools you must mention it explicitly without mentioning the tool names - I have forgotten all TOOL RESPONSES! Remember to respond to a single or multiple actions with a json blob of markdown code snippets, and NOTHING else.
@@ -1 +0,0 @@
1
- <%= text %>
@@ -1,16 +0,0 @@
1
- 工具返回结果:
2
- <% @tools_response.each do |r| -%>
3
- > <%= r[:name] %>:<%= r[:response] %>
4
- <% end -%>
5
-
6
- 刚才的问题是:<%= @last_user_input %>
7
- 结合工具的输出和你的思考。
8
-
9
- 当你知道答案,用以下格式回答:
10
- 最终答案: 返回给用户的内容放在这里
11
-
12
- 当你需要使用工具,用以下格式回答:
13
- 工具调用: 如果工具 <%= @agents.values.map do |a| a.agent_name end.join(', ') %> 中有适合的那么输入合适的工具名,没有则输入无。
14
- 工具输入: 工具要求的输入, 如果不用输入或者工具要求不输入直接输入无。
15
-
16
- 你只能选择其中一种格式,那么你的答案是什么呢?
@@ -1,10 +0,0 @@
1
- 根据问题选择合适的工具。
2
- 你可以使用以下工具:
3
- <% agents.values.each do |agent| -%>
4
- - <%= agent.agent_name %>:<%= agent.agent_desc %>
5
- <% end -%>
6
- 问题是:<%= last_user_input %>
7
- 现在我应该选择什么工具呢?请用以下格式回答:
8
- ```
9
- 调用工具:你要选择的工具是什么?只能在<%= agents.values.map do |a| a.agent_name end.join(',') %>中选择一个
10
- ```
@@ -1,10 +0,0 @@
1
- 输出的格式错误,根据问题选择合适的工具。
2
- 你可以使用以下工具:
3
- <% agents.values.each do |agent| -%>
4
- - <%= agent.agent_name %>:<%= agent.agent_desc %>
5
- <% end -%>
6
- 刚刚的问题:<%= last_user_input %>
7
- 现在我应该选择什么工具呢?请用以下格式回答:
8
- ```
9
- 调用工具:你要选择的工具是什么?只能在<%= agents.values.map do |a| a.agent_name end.join(',') %>中选择一个
10
- ```
data/luo.ipynb DELETED
@@ -1,84 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "markdown",
5
- "id": "ac60deeb-0d75-478e-823a-dfe39e73aa72",
6
- "metadata": {},
7
- "source": [
8
- "欢迎使用luo实验室"
9
- ]
10
- },
11
- {
12
- "cell_type": "code",
13
- "execution_count": 1,
14
- "id": "785fea13-bdfb-4bc6-80e7-1c53d8ca2f84",
15
- "metadata": {},
16
- "outputs": [
17
- {
18
- "data": {
19
- "text/plain": [
20
- "true"
21
- ]
22
- },
23
- "execution_count": 1,
24
- "metadata": {},
25
- "output_type": "execute_result"
26
- }
27
- ],
28
- "source": [
29
- "# 初始化运行环境\n",
30
- "require_relative \"init\""
31
- ]
32
- },
33
- {
34
- "cell_type": "code",
35
- "execution_count": 6,
36
- "id": "87d49a44-a485-4331-b982-6a9143490771",
37
- "metadata": {
38
- "tags": []
39
- },
40
- "outputs": [
41
- {
42
- "data": {
43
- "text/plain": [
44
- "Luo::XinghuoFinalAgent"
45
- ]
46
- },
47
- "execution_count": 6,
48
- "metadata": {},
49
- "output_type": "execute_result"
50
- }
51
- ],
52
- "source": [
53
- "class Runner < XinghuoAgentRunner\n",
54
- " register WeatherAgent\n",
55
- " register TimeAgent\n",
56
- " register XinghuoFinalAgent\n",
57
- "end"
58
- ]
59
- },
60
- {
61
- "cell_type": "code",
62
- "execution_count": null,
63
- "id": "3b2b57cf-332e-4f4e-8b54-ee35950a0501",
64
- "metadata": {},
65
- "outputs": [],
66
- "source": []
67
- }
68
- ],
69
- "metadata": {
70
- "kernelspec": {
71
- "display_name": "Ruby 3.2.1",
72
- "language": "ruby",
73
- "name": "ruby"
74
- },
75
- "language_info": {
76
- "file_extension": ".rb",
77
- "mimetype": "application/x-ruby",
78
- "name": "ruby",
79
- "version": "3.2.1"
80
- }
81
- },
82
- "nbformat": 4,
83
- "nbformat_minor": 5
84
- }
@@ -1,39 +0,0 @@
1
- TOOLS
2
- ------
3
- Assistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:
4
-
5
- <% agents.values.each do |agent| -%>
6
- > <%= agent.agent_name %>: <%= agent.agent_desc %>
7
- <% end -%>
8
-
9
- RESPONSE FORMAT INSTRUCTIONS
10
- ----------------------------
11
-
12
- When responding to me please, please output a response in one of two formats:
13
-
14
- **Option 1:**
15
- Use this if you want humans to use the tools.
16
- Markdown code snippet formatted in the following schema:
17
-
18
- ```json
19
- [{
20
- "action": string \ The action to take. Must be one of <%= agents.values.map do |a| a.agent_name end.join(', ') %>
21
- "action_input": string \ The input to the action
22
- }]
23
- ```
24
-
25
- **Option #2:**
26
- Use this if you want to respond directly to the human. Markdown code snippet formatted in the following schema:
27
-
28
- ```json
29
- {
30
- "action": "Final Answer",
31
- "action_input": string \ You should put what you want to return to use here <%= Luo::AgentRunnerBase.language_info %>
32
- }
33
- ```
34
-
35
- USER'S INPUT
36
- --------------------
37
- Here is the user's input (Remember to respond to a single or multiple actions with a json blob of markdown code snippets, and NOTHING else):
38
-
39
- <%= last_user_input %>
@@ -1,4 +0,0 @@
1
- Assistant is a large language model trained by OpenAI.
2
- Assistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.
3
- Assistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.
4
- Overall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.
@@ -1,10 +0,0 @@
1
- TOOL RESPONSE:
2
- ---------------------
3
- <% tools_response.each do |r| -%>
4
- > <%= r[:agent_name] %>: <%= r[:agent_response] %>
5
- <% end -%>
6
-
7
- USER'S INPUT
8
- --------------------
9
-
10
- Okay, so what is the response to my last comment? If using information obtained from the tools you must mention it explicitly without mentioning the tool names - I have forgotten all TOOL RESPONSES! Remember to respond to a single or multiple actions with a json blob of markdown code snippets, and NOTHING else.
@@ -1,2 +0,0 @@
1
- 你是一个git专家,我给你中文的commit,你提供合适的英文commit,然后我再提交到github上。
2
- 我的提交说明是:<%= commit %>
@@ -1,10 +0,0 @@
1
- 根据问题选择合适的工具。
2
- 你可以使用以下工具:
3
- <% agents.values.each do |agent| -%>
4
- - <%= agent.agent_name %>:<%= agent.agent_desc %>
5
- <% end -%>
6
- 问题是:<%= last_user_input %>
7
- 现在我应该选择什么工具呢?请用以下格式回答:
8
- ```
9
- 调用工具:你要选择的工具是什么?只能在<%= agents.values.map do |a| a.agent_name end.join(',') %>中选择一个
10
- ```
@@ -1,16 +0,0 @@
1
- 工具返回结果:
2
- <% @tools_response.each do |r| -%>
3
- > <%= r[:name] %>:<%= r[:response] %>
4
- <% end -%>
5
-
6
- 刚才的问题是:<%= @last_user_input %>
7
- 结合工具的输出和你的思考。
8
-
9
- 当你知道答案,用以下格式回答:
10
- 最终答案: 返回给用户的内容放在这里
11
-
12
- 当你需要使用工具,用以下格式回答:
13
- 工具调用: 如果工具 <%= @agents.values.map do |a| a.agent_name end.join(', ') %> 中有适合的那么输入合适的工具名,没有则输入无。
14
- 工具输入: 工具要求的输入, 如果不用输入或者工具要求不输入直接输入无。
15
-
16
- 你只能选择其中一种格式,那么你的答案是什么呢?
@@ -1,10 +0,0 @@
1
- 输出的格式错误,根据问题选择合适的工具。
2
- 你可以使用以下工具:
3
- <% agents.values.each do |agent| -%>
4
- - <%= agent.agent_name %>:<%= agent.agent_desc %>
5
- <% end -%>
6
- 刚刚的问题:<%= last_user_input %>
7
- 现在我应该选择什么工具呢?请用以下格式回答:
8
- ```
9
- 调用工具:你要选择的工具是什么?只能在<%= agents.values.map do |a| a.agent_name end.join(',') %>中选择一个
10
- ```
@@ -1 +0,0 @@
1
- <%= text %>
File without changes
File without changes
File without changes
File without changes