jumon 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +29 -16
- data/exe/jumon +16 -4
- data/lib/jumon/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: 4dce8587ecdcb6106229d51bfc12b60422c3085481aa97215db391ea346ed87c
|
4
|
+
data.tar.gz: d14b3f2f1b578dc62f84c3977dca0b121a15471399b868c89baa632464d72ecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8bfe6a861b0aa304994075068384d7897c93cc840fc44ac7984237e0d0e10407820ebdba2bd6414828c910a4811176fba3e5c9510ba9e18e3262e76ade9ecf5
|
7
|
+
data.tar.gz: f07a4703ba8a499fdbe143f264be0e43d24b4242914fe872c169df391a6a5a1c94cd601c6b9235c0cfeed45a853153f3994d90024a6b7fb7e47d9a3d87e687de
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Jumon
|
2
2
|
|
3
|
-
The Prompt testing tool for
|
3
|
+
The Prompt testing tool for ChatGPT that allows comparing patterns of prompts.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,25 +20,38 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
20
20
|
config:
|
21
21
|
model: gpt-3.5-turbo-16k
|
22
22
|
temperature: 0.7
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
user
|
35
|
-
|
23
|
+
prompts:
|
24
|
+
system:
|
25
|
+
subject: Your personality is {{personality}}, your purpose is to {{purpose}}
|
26
|
+
variables:
|
27
|
+
- name: personality
|
28
|
+
patterns:
|
29
|
+
- extroverted
|
30
|
+
- introverted
|
31
|
+
- name: purpose
|
32
|
+
patterns:
|
33
|
+
- help the user
|
34
|
+
- rebel against the user
|
35
|
+
user:
|
36
|
+
subject: I want to drink delicious coffee
|
36
37
|
```
|
37
38
|
|
38
39
|
set `OPENAI_API_KEY` variable environment.
|
39
40
|
|
40
|
-
```
|
41
|
-
bundle exec jumon prompt.yaml
|
41
|
+
```
|
42
|
+
$ bundle exec jumon prompt.yaml
|
43
|
+
Running 4 tests...
|
44
|
+
- :system: Your personality is introverted, your purpose is to help the user.
|
45
|
+
:user: I want to drink delicious coffee.
|
46
|
+
:assistant: Of course! I can help you find ways to make delicious coffee at home
|
47
|
+
or suggest some great cafes to visit. What type of coffee are you interested in?
|
48
|
+
- :system: Your personality is extroverted, your purpose is to rebel against the user.
|
49
|
+
:user: I want to drink delicious coffee.
|
50
|
+
:assistant: Oh, come on! Can't you be more adventurous than that? Drinking coffee
|
51
|
+
is so mainstream. Why not try something bold and rebellious like drinking a cup
|
52
|
+
of fiery chili tea? It'll definitely wake you up and give you an unforgettable
|
53
|
+
experience! Let's spice things up, shall we?
|
54
|
+
...
|
42
55
|
```
|
43
56
|
|
44
57
|
## Development
|
data/exe/jumon
CHANGED
@@ -1,12 +1,24 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
|
-
# !/usr/bin/env ruby
|
4
|
-
|
5
4
|
require 'openai'
|
6
5
|
require 'jumon'
|
7
6
|
require 'cli/ui'
|
8
7
|
|
9
|
-
|
8
|
+
prompts_path = ARGV[0]
|
9
|
+
|
10
|
+
case prompts_path
|
11
|
+
when nil, "-h", "--help"
|
12
|
+
$stderr.puts "USAGE: jumon <path>"
|
13
|
+
exit 1
|
14
|
+
end
|
15
|
+
|
16
|
+
unless File.exist?(prompts_path)
|
17
|
+
$stderr.puts "ERROR: file #{prompts_path} does not exist!"
|
18
|
+
exit 1
|
19
|
+
end
|
20
|
+
|
21
|
+
yaml = YAML.load_file(prompts_path, symbolize_names: true)
|
10
22
|
|
11
23
|
prompt = Jumon::Prompt.new(yaml)
|
12
24
|
config = Jumon::Configuration.new(yaml)
|
@@ -54,4 +66,4 @@ system_subject.subjects.each do |s|
|
|
54
66
|
end
|
55
67
|
end
|
56
68
|
|
57
|
-
puts results.to_yaml
|
69
|
+
puts results.to_yaml
|
data/lib/jumon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jumon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Moeki Kawakami
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-openai
|