luo 0.1.17 → 0.1.18
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/.ipynb_checkpoints/luo-checkpoint.ipynb +84 -0
- data/Dockerfile +20 -8
- data/Gemfile.lock +1 -1
- data/docker-compose.yml +6 -0
- data/init.rb +16 -0
- data/lib/luo/cli.rb +1 -1
- data/lib/luo/init_project.rb +1 -0
- data/lib/luo/projects/init.rb +7 -1
- data/lib/luo/projects/luo.ipynb +84 -0
- data/lib/luo/version.rb +1 -1
- data/luo.ipynb +84 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adfb2e4a7dc78ddffac500eb49ad1d1cace2fee733c956f883d7333009b4c60c
|
4
|
+
data.tar.gz: 691f9f3cb1f4bee101b9fb71659426a9960e2eeb74b57c68ab37628e41b867e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b3762db47bb0f75996d89deb0202b3cb4b09f6ba5204e47febc8a20ce23d58f41c8860b3af867a20cc517b519f627cbbd2fbd17dac8426400d9657e0fe2e9d3
|
7
|
+
data.tar.gz: faf5099423169ce3c7d7b98e5c0c52923bd0ff3cfe448bcc961abd7278b4e03972a3c2e1fa010943d4e3bccbd64e2d6c06459fc196053c277d51333dbd5d3ecd
|
@@ -0,0 +1,84 @@
|
|
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
|
+
}
|
data/Dockerfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
FROM ruby:3.2.2
|
1
|
+
FROM ruby:3.2.2
|
2
2
|
|
3
3
|
# Install docker/buildx-bin
|
4
|
-
COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx
|
4
|
+
#COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx
|
5
5
|
|
6
6
|
# Set the working directory to /luo
|
7
7
|
WORKDIR /luo
|
@@ -12,12 +12,25 @@ COPY Gemfile Gemfile.lock luo.gemspec ./
|
|
12
12
|
# Required in luo.gemspec
|
13
13
|
COPY lib/luo/version.rb /luo/lib/luo/version.rb
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
&&
|
18
|
-
&& gem install bundler --version=2.4.3 \
|
15
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
16
|
+
build-essential gcc \
|
17
|
+
&& gem install bundler --version=2.4.6 \
|
19
18
|
&& bundle install
|
20
19
|
|
20
|
+
## install python and jupyterlab
|
21
|
+
# Install Python and JupyterLab
|
22
|
+
RUN apt-get install -y --no-install-recommends \
|
23
|
+
python3 python3-pip python3-dev && \
|
24
|
+
pip3 install --no-cache-dir jupyterlab && \
|
25
|
+
pip3 install jupyterlab-language-pack-zh-CN
|
26
|
+
|
27
|
+
RUN gem install pry
|
28
|
+
RUN gem install iruby
|
29
|
+
RUN iruby register --force
|
30
|
+
|
31
|
+
# Expose the JupyterLab port
|
32
|
+
EXPOSE 8888
|
33
|
+
|
21
34
|
# Copy the rest of our application code into the container.
|
22
35
|
# We do this after bundle install, to avoid having to run bundle
|
23
36
|
# everytime we do small fixes in the source code.
|
@@ -27,8 +40,7 @@ COPY . .
|
|
27
40
|
RUN gem build luo.gemspec && \
|
28
41
|
gem install ./luo-*.gem --no-document
|
29
42
|
|
30
|
-
RUN git config --global --add safe.directory /workdir
|
31
|
-
|
32
43
|
WORKDIR /workdir
|
44
|
+
RUN rm -rf /luo
|
33
45
|
|
34
46
|
ENTRYPOINT ["luo"]
|
data/Gemfile.lock
CHANGED
data/docker-compose.yml
ADDED
data/init.rb
ADDED
@@ -0,0 +1,16 @@
|
|
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
|
data/lib/luo/cli.rb
CHANGED
data/lib/luo/init_project.rb
CHANGED
data/lib/luo/projects/init.rb
CHANGED
@@ -0,0 +1,84 @@
|
|
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.2"
|
80
|
+
}
|
81
|
+
},
|
82
|
+
"nbformat": 4,
|
83
|
+
"nbformat_minor": 5
|
84
|
+
}
|
data/lib/luo/version.rb
CHANGED
data/luo.ipynb
ADDED
@@ -0,0 +1,84 @@
|
|
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
|
+
}
|
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.
|
4
|
+
version: 0.1.18
|
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-
|
11
|
+
date: 2023-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|
@@ -180,6 +180,7 @@ files:
|
|
180
180
|
- ".idea/misc.xml"
|
181
181
|
- ".idea/modules.xml"
|
182
182
|
- ".idea/vcs.xml"
|
183
|
+
- ".ipynb_checkpoints/luo-checkpoint.ipynb"
|
183
184
|
- ".rspec"
|
184
185
|
- Dockerfile
|
185
186
|
- Gemfile
|
@@ -187,7 +188,9 @@ files:
|
|
187
188
|
- README.md
|
188
189
|
- README.zh.md
|
189
190
|
- Rakefile
|
191
|
+
- docker-compose.yml
|
190
192
|
- exe/luo
|
193
|
+
- init.rb
|
191
194
|
- lib/luo.rb
|
192
195
|
- lib/luo/agent.rb
|
193
196
|
- lib/luo/agent_runner_base.rb
|
@@ -206,6 +209,7 @@ files:
|
|
206
209
|
- lib/luo/projects/application.rb
|
207
210
|
- lib/luo/projects/env
|
208
211
|
- lib/luo/projects/init.rb
|
212
|
+
- lib/luo/projects/luo.ipynb
|
209
213
|
- lib/luo/projects/prompts/agent_input.md.erb
|
210
214
|
- lib/luo/projects/prompts/agent_system.md.erb
|
211
215
|
- lib/luo/projects/prompts/agent_tool_input.md.erb
|
@@ -229,6 +233,7 @@ files:
|
|
229
233
|
- lib/luo/xinghuo_agent_runner.rb
|
230
234
|
- luo
|
231
235
|
- luo.gemspec
|
236
|
+
- luo.ipynb
|
232
237
|
- sig/luo.rbs
|
233
238
|
- sig/luo/agent.rbs
|
234
239
|
- sig/luo/agent_runner_base.rbs
|