Skip to content

Commit

Permalink
feat: 根据服务商提示密钥格式
Browse files Browse the repository at this point in the history
  • Loading branch information
rehiy committed Mar 4, 2024
1 parent bda1c5b commit e7769cd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
14 changes: 12 additions & 2 deletions webview/src/apps/llmodel/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,17 @@
<label class="form-label">密钥 *</label>
<input type="text" name="secret" class="form-control" [(ngModel)]="formdata.secret" required />
<div class="form-text">
Google 和 OpenAI 填写 KEY,科大讯飞填写 APP-ID,API-KEY,API-SECRET,文心一言填写 API-KEY,API-SECRET
@switch (formdata.provider) {
@case ('xunfei') {
科大讯飞填写 APP-ID,API-KEY,API-SECRET
}
@case ('baidu') {
文心一言填写 API-KEY,API-SECRET
}
@default {
请填写从服务商获取的 API-KEY
}
}
</div>
</div>
<div class="col-12">
Expand All @@ -69,4 +79,4 @@
<button type="submit" class="btn btn-primary" [disabled]="myform.invalid">确认</button>
</div>
</form>
</div>
</div>
12 changes: 11 additions & 1 deletion webview/src/apps/llmodel/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,17 @@
<label class="form-label">密钥 *</label>
<input type="text" name="secret" class="form-control" [(ngModel)]="formdata.secret" required />
<div class="form-text">
Google 和 OpenAI 填写 KEY,科大讯飞填写 APP-ID,API-KEY,API-SECRET,文心一言填写 API-KEY,API-SECRET
@switch (formdata.provider) {
@case ('xunfei') {
科大讯飞填写 APP-ID,API-KEY,API-SECRET
}
@case ('baidu') {
文心一言填写 API-KEY,API-SECRET
}
@default {
请填写从服务商获取的 API-KEY
}
}
</div>
</div>
<div class="col-12">
Expand Down

0 comments on commit e7769cd

Please sign in to comment.