Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support request multiple models in client chat #189

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $ qianfan chat [OPTIONS]

* `--model TEXT`:模型名称 [default:ERNIE-Bot-turbo]
* `--endpoint TEXT`:模型的 endpoint
* `--multi-line / --no-multi-line`:多行模式,通过两次回车确认提交消息 [default:no-multi-line]
* `--multi-line / --no-multi-line`:多行模式,提交时需要先按下 Esc 再回车,以避免与文本换行冲突 [default:no-multi-line]
* `--list-model -l`:打印支持的模型名称列表
* `--help`:展示帮助文档

Expand All @@ -59,19 +59,20 @@ $ qianfan chat [OPTIONS]
**用法**:

```console
$ qianfan completion [OPTIONS] MESSAGES...
$ qianfan completion [OPTIONS] PROMPTS...
```

**Arguments 参数**:

* `MESSAGES...`:需要补全的 prompt,支持传递多个 prompt 以表示对话历史,依次表示用户和模型的消息,必须为奇数 [required]
* `PROMPTS...`:需要补全的 prompt,支持传递多个 prompt 以表示对话历史,依次表示用户和模型的消息,必须为奇数。如不传递则需要在命令行中交互输入。

**Options 选项**:

* `--model TEXT`:模型名称 [default:ERNIE-Bot-turbo]
* `--endpoint TEXT`:模型的 endpoint
* `--plain / --no-plain`:普通文本模式,不使用富文本 [default:no-plain]
* `--list-model -l`:打印支持的模型名称列表
* `--multi-line`:多行模式,提交时需要先按下 Esc 再回车,以避免与文本换行冲突
* `--help`:展示帮助文档

### txt2img 文生图
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ python-dateutil = "^2.8.2"
rich = ">=13.0.0"
typer = ">=0.9.0"
tenacity = "^8.2.3"
prompt-toolkit = ">=3.0.38"

[tool.poetry.scripts]
qianfan = "qianfan.common.client.main:main"
Expand Down
Loading
Loading