@@ -15,7 +15,7 @@ public class AuthException extends RuntimeException {
private final int code;
public AuthException() {
- super(HttpStatus.UNAUTHORIZED.getReasonPhrase());
+ super("没有操作权限");
this.code = HttpStatus.UNAUTHORIZED.value();
}
@@ -43,7 +43,8 @@ langchat:
table: vector_1
dimension: 384
web-search:
- google:
- api-key: <KEY>
- csi: <CSI>
+ # Google搜索
+# google:
+# api-key: <KEY>
+# csi: <CSI>
@@ -6,9 +6,3 @@ export function getPrompts(data: any) {
data: data,
});
-
-export function getById(id: string) {
- return http.get({
- url: '/aigc/prompt/' + id,
- });
-}
@@ -47,12 +47,16 @@
async function onSubmit(values: any) {
if (values !== false) {
isShow.value = false;
- if (isNullOrWhitespace(values.id)) {
- await add(values);
+ const data = { ...values };
+ if (data.apiKey.indexOf('****')) {
+ data.apiKey = undefined;
+ }
+ if (isNullOrWhitespace(data.id)) {
+ await add(data);
emit('reload');
message.success('新增成功');
} else {
- await update(values);
+ await update(data);
message.success('修改成功');