rabbitcat commited on
Commit
471cad8
·
verified ·
1 Parent(s): 4f62f2c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +63 -0
README.md CHANGED
@@ -1,3 +1,66 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ language:
4
+ - en
5
+ - zh
6
+ library_name: transformers
7
+ tags:
8
+ - code
9
  ---
10
+
11
+ Bash Copilot is an LLM to generate bash command line or script based on your input of natural language description.
12
+ This model supports multiturn conversation, which means you can (1) implicitly refer to an formerly mentioned entity using pronoun or omitting it, (2) optimize or complete the target code step by step.
13
+
14
+ Bash Copilot is a fine-tuned version of Yi-1.5-6B with 21k multiturn conversations of both Chinese and English that converts natural language to bash code.
15
+ The source corpus is collected from github repos of more than 500 stars. The dataset will be released with next release of BashCopilot-6B (non-preview version).
16
+
17
+ Here are some examples:
18
+
19
+ ```
20
+ <|im_start|>user
21
+ compare id field of a.json and b.json
22
+ <|im_end|>
23
+
24
+ <|im_start|>assistant
25
+ diff <(jq -r '.id' a.json) <(jq -r '.id' b.json)<|im_end|>
26
+
27
+ <|im_start|>user
28
+ print the bigger one
29
+ <|im_end|>
30
+
31
+ <|im_start|>assistant
32
+ echo $(( $(jq -r '.id' a.json) > $(jq -r '.id' b.json)? $(jq -r '.id' a.json) : $(jq -r '.id' b.json) ))<|im_end|>
33
+ ```
34
+
35
+
36
+
37
+ ```
38
+ <|im_start|>user
39
+ count the file under /path/to/target
40
+ <|im_end|>
41
+
42
+ <|im_start|>assistant
43
+ find /path/to/target -type f | wc -l<|im_end|>
44
+
45
+ <|im_start|>user
46
+ write this to count.sh
47
+ <|im_end|>
48
+
49
+ <|im_start|> assistant
50
+ echo "find /path/to/target -type f | wc -l" > count.sh<|im_end|>
51
+
52
+ <|im_start|>user
53
+ repeatedly run it until it returns 10, then break the loop
54
+ <|im_end|>
55
+
56
+ <|im_start|>assistant
57
+ while [ $($count.sh) -ne 10 ]; do sleep 1; done<|im_end|>
58
+
59
+ <|im_start|>user
60
+ instead of sleep, send "not ready" to 1.2.3.4:8888 via TCP
61
+ <|im_end|>
62
+
63
+ <|im_start|>assistant
64
+ while [ $($count.sh) -ne 10 ]; do echo not ready > /dev/tcp/1.2.3.4/8888; sleep 1; done
65
+ <|im_end|>
66
+ ```