Skip to content

Commit f70370e

Browse files
authored
Update README.md
1 parent 12bb22f commit f70370e

File tree

1 file changed

+58
-19
lines changed

1 file changed

+58
-19
lines changed

README.md

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,76 @@ This API service recommends a k number of programs similar to another program y
1212
`git clone git@github.com:kommandr/kommandr-ML.git`
1313

1414
### Build docker image
15-
`docker build -t api-recommender .`
15+
`docker build -t api-recommendr .`
1616

1717
### Run docker container
18-
`docker run --rm -it --name api-recommender -p 7070:7070 api-recommender`
18+
`docker run --rm -it --name api-recommendr -p 7070:7070 --network backend_default api-recommendr`
1919

2020
## Usage
21-
Examples
21+
Parameters:
22+
- program: the program name
23+
- platformid: the platformId
24+
- 1: Generic, a program is usually installed and used in multiple OS's
25+
- 2: Linux
26+
- 3: macOS
27+
- 4: Windows
28+
- k: return up to k programs
29+
-
2230

2331
### Show up to 10 programs similar to 'git commit'
2432
```
25-
$ curl -X GET 'http://localhost:7070/recommendations?program=git%20commit&k=10'
33+
$ curl -X GET 'http://192.168.99.100:7070/recommendations?program=rmdir&platformid=1&k=5'
2634
{
27-
"git bisect": "Use binary search to find the commit that introduced a bug.\nGit automatically jumps back and forth in the commit graph to progressively narrow down the faulty commit.",
28-
"git blame": "Show commit hash and last author on each line of a file.",
29-
"git clone": "Clone an existing repository.",
30-
"git gc": "Optimise the local repository by cleaning unnecessary files.",
31-
"git pull": "Fetch branch from a remote repository and merge it to local repository.",
32-
"git rm": "Remove files from repository index and local filesystem.",
33-
"hg add": "Adds specified files to the staging area for the next commit in Mercurial.",
34-
"hg commit": "Commit all staged or specified files to the repository.",
35-
"hg init": "Create a new repository in the specified directory.",
36-
"hg pull": "Pull changes from a specified repository to the local repository."
35+
"recommendations": [
36+
{
37+
"cliName": "mkdir",
38+
"shortDescription": "Creates a directory."
39+
},
40+
{
41+
"cliName": "popd",
42+
"shortDescription": "Changes the current directory to the directory stored by the `pushd` command."
43+
},
44+
{
45+
"cliName": "popd",
46+
"shortDescription": "Remove a directory placed on the directory stack by the `pushd` command."
47+
},
48+
{
49+
"cliName": "popd",
50+
"shortDescription": "Remove a directory placed on the directory stack via the pushd shell built-in."
51+
},
52+
{
53+
"cliName": "ls",
54+
"shortDescription": "List directory contents."
55+
}
56+
]
3757
}
3858
```
3959
### Show up to 5 programs similar to 'halt'
4060
```
41-
$ curl -X GET 'http://127.0.0.1:7070/recommendations?program=halt&k=5'
61+
$ curl -X GET 'http://192.168.99.100:7070/recommendations?program=halt&platformid=1&k=5'
4262
{
43-
"kexec": "Directly reboot into a new kernel.",
44-
"reboot": "Reboot the system.",
45-
"shutdown": "Shutdown and reboot the system.",
46-
"systemsetup": "Configure System Preferences machine settings."
63+
"recommendations": [
64+
{
65+
"cliName": "reboot",
66+
"shortDescription": "Reboot the system."
67+
},
68+
{
69+
"cliName": "shutdown",
70+
"shortDescription": "Shutdown and reboot the system."
71+
},
72+
{
73+
"cliName": "shutdown",
74+
"shortDescription": "Shutdown and reboot the system."
75+
},
76+
{
77+
"cliName": "kexec",
78+
"shortDescription": "Directly reboot into a new kernel."
79+
},
80+
{
81+
"cliName": "systemsetup",
82+
"shortDescription": "Configure System Preferences machine settings."
83+
}
84+
]
4785
}
4886
```
87+

0 commit comments

Comments
 (0)