Skip to content

Commit

Permalink
Improve readme for file
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Apr 3, 2024
1 parent d2a237d commit fb3522b
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ npm i @jacksontian/kimi # for scripting

```sh
$ kimi
Welcome to KIMI CLI(v1.0.0), type .help for more information.
Current model is moonshot-v1-128k.
What is your query: 写一首七言唐诗
春风拂面桃花开,
绿水青山共舞来。
Expand All @@ -36,6 +38,47 @@ What is your query: 写一首七言唐诗
[Verbose] request id: chatcmpl-5cc0493c22fb4268b0772b08300886b1, usage tokens: 62
```

### File helper

We support a tiny command to manage files.

```bash
$ kimi-file # list all files
| id | filename | purpose | type | size | created_at | status |
| -------------------- | ------------------------------ | ------------ | ---- | ---------- | ------------------- | ------ |
| co6efvg3r07e3eepmxxx | 1906.08237.pdf | file-extract | file | 761790 | 2024-04-03 05:24:14 | ok |
$ kimi-file upload ~/xxx/test.pdf # upload file
$ kimi-file get the-file-id # get file
$ kimi-file rm the-file-id # delete file
```

You can use `.add_file` command to choose a uploaded file:

```bash
$ kimi
Welcome to KIMI CLI(v1.0.0), type .help for more information.
Current model is moonshot-v1-128k.
What is your query: .add_file
? Please select your file: (Use arrow keys)
? Please select your file: 1906.08237.pdf
The file 1906.08237.pdf is added into chat session.
What is your query: 请解读 1906.08237.pdf 文件内容
```
### Switch model
You can use `.set_model` command to switch models:
```bash
$ kimi
Welcome to KIMI CLI(v1.0.0), type .help for more information.
Current model is moonshot-v1-128k.
What is your query: .set_model
? Please select your model:
? Please select your model: moonshot-v1-32k
The model is switched to moonshot-v1-32k now.
```
## Usage for scripting
```js
Expand Down

0 comments on commit fb3522b

Please sign in to comment.