From e5677f15ed95c6e740ba29325ba94af2f5787bb4 Mon Sep 17 00:00:00 2001 From: ylzhangah <1194926515@qq.com> Date: Thu, 24 Oct 2024 17:10:56 +0800 Subject: [PATCH] fix some error --- ...50\347\275\262\346\214\207\345\215\227.md" | 13 ++++++----- .../chart/databases/configs/mysql/init.sql | 3 +++ .../chart/euler_copilot/values.yaml | 22 +++++++++---------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git "a/docs/user-guide/\351\203\250\347\275\262\346\214\207\345\215\227/\347\275\221\347\273\234\347\216\257\345\242\203\344\270\213\351\203\250\347\275\262\346\214\207\345\215\227.md" "b/docs/user-guide/\351\203\250\347\275\262\346\214\207\345\215\227/\347\275\221\347\273\234\347\216\257\345\242\203\344\270\213\351\203\250\347\275\262\346\214\207\345\215\227.md" index ad0b40ce..bd91834c 100644 --- "a/docs/user-guide/\351\203\250\347\275\262\346\214\207\345\215\227/\347\275\221\347\273\234\347\216\257\345\242\203\344\270\213\351\203\250\347\275\262\346\214\207\345\215\227.md" +++ "b/docs/user-guide/\351\203\250\347\275\262\346\214\207\345\215\227/\347\275\221\347\273\234\347\216\257\345\242\203\344\270\213\351\203\250\347\275\262\346\214\207\345\215\227.md" @@ -342,9 +342,10 @@ cd /home/euler-copilot-framework/euler-copilot-helm/scripts && tree 1. 修改 values.yaml 的 pg 的镜像仓为 `pg-data` 2. 修改 values.yaml 的 rag 部分的字段 `knowledgebaseID: openEuler_2bb3029f` - 3. 将 `vim euler-copilot-frameworkeuler-copilot-helm/chart/templates/pgsql/pgsql-deployment.yaml` 的 volume 相关字段注释 - 4. 进入 `cd euler-copilot-frameworkeuler-copilot-helm/chart`,执行更新服务 `helm upgrade -n euler-copilot service .` - 5. 进入网页端进行 openEuler 专业知识领域的问答 + 3. 将 `vim euler-copilot-helm/chart/databases/templates/pgsql/pgsql-deployment.yaml` 的 volumes 相关字段注释 + 4. 进入 `cd euler-copilot-helm/chart/databases`,执行更新服务 `helm upgrade -n euler-copilot databases .` + 5. 进入 `cd euler-copilot-helm/chart/euler_copilot`,执行更新服务 `helm upgrade -n euler-copilot service .` + 6. 进入网页端进行 openEuler 专业知识领域的问答 ### 2. 构建项目专属知识领域智能问答 @@ -431,8 +432,8 @@ cd /home/euler-copilot-framework/euler-copilot-helm/scripts && tree 5. 按照如下方式配置文件,并更新服务。 - ```bash - vim euler-copilot-helm/chart/values.yaml + ```bash + vim euler-copilot-helm/chart/euler_copilot/values.yaml ``` 修改如下部分 @@ -515,7 +516,7 @@ no_proxy=172.21.31.10 # 代理中剔除本机IP ### 5. GPU环境部署大模型时出现无法流式回复? -在服务执行 curl 大模型失败,将 `"stream": true` 改为 `"stream": false`, 可以 curl 通 +在服务执行 curl 大模型失败,但是将 `"stream": true` 改为 `"stream": false`就可以 curl 通? ```bash curl http://localhost:30000/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-123456" -d '{ diff --git a/euler-copilot-helm/chart/databases/configs/mysql/init.sql b/euler-copilot-helm/chart/databases/configs/mysql/init.sql index db871b22..be2a63f0 100644 --- a/euler-copilot-helm/chart/databases/configs/mysql/init.sql +++ b/euler-copilot-helm/chart/databases/configs/mysql/init.sql @@ -4,6 +4,9 @@ GRANT ALL ON `euler_copilot`.* TO 'euler_copilot'@'%'; CREATE DATABASE IF NOT EXISTS oauth2 DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_bin; GRANT ALL ON `oauth2`.* TO 'euler_copilot'@'%'; use oauth2; + +SET FOREIGN_KEY_CHECKS = 0; + CREATE TABLE IF NOT EXISTS `manage_user` ( `id` int NOT NULL AUTO_INCREMENT, `username` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, diff --git a/euler-copilot-helm/chart/euler_copilot/values.yaml b/euler-copilot-helm/chart/euler_copilot/values.yaml index 127f81c7..6a94d35d 100644 --- a/euler-copilot-helm/chart/euler_copilot/values.yaml +++ b/euler-copilot-helm/chart/euler_copilot/values.yaml @@ -4,8 +4,8 @@ globals: imageRegistry: "hub.oepkgs.net/neocopilot" # [必填] 镜像拉取策略 imagePullPolicy: IfNotPresent - # [必填] 部署域名 - domain: # 需要修改为EulerCopilot域名。单节点部署时,服务基于Host进行区分,无法使用IP地址 + # [必填] 部署域名:需要修改为EulerCopilot域名。单节点部署时,服务基于Host进行区分,无法使用IP地 + domain: # 用于问答和推理的大模型 llm: # [必填] 模型类型 @@ -76,7 +76,7 @@ euler_copilot: # Volume设置 volume: # [必填] Embedding模型的位置 - models: /home/EulerCopilot/models + models: "/home/EulerCopilot/models" # Service设置 service: # [必填] Service类型,ClusterIP或NodePort @@ -161,7 +161,7 @@ euler_copilot: key2: pQ6rStUvWxYzA1B9C # [必填] 加密密钥3 key3: D4eFgHjKlMnOpQrS3 - # [必填] Web前端地址,需要添加http/https前缀 + # [必填] Web前端地址,需要添加https前缀 web_url: # 登录设置 login: @@ -175,16 +175,16 @@ euler_copilot: client_id: # [enabled为true时必填] OIDC 客户端密钥 client_secret: - # [enabled为true时必填] OIDC Token获取地址; 替换为AuthHub的实际域名;下同 - token_url: http:///oauth2/token + # [enabled为true时必填] OIDC Token获取地址 + token_url: http://authhub-backend-service-authhub.euler-copilot.svc.cluster.local:11120/oauth2/token # [enabled为true时必填] OIDC 用户信息地址 - user_url: http:///oauth2/introspect + user_url: http://authhub-backend-service-authhub.euler-copilot.svc.cluster.local:11120/oauth2/introspect # [enabled为true时必填] OIDC 刷新Token地址 - refresh_token_url: http:///oauth2/refresh-token - # [enabled为true时必填] EulerCopilot主页地址; 替换为 EulerCopilot 实际的域名;下同 + refresh_token_url: http://authhub-backend-service-authhub.euler-copilot.svc.cluster.local:11120/oauth2/refresh-token + # [enabled为true时必填] EulerCopilot主页地址:请将替换为 EulerCopilot 实际的域名 euler_copilot_front: https:///api/auth/login - # [enabled为true时必填] OIDC登录跳转地址,包括Scope、Client ID、Redirect URI等参数; 替换为实际的Client ID - redirect: http:///oauth2/authorize?client_id=&redirect_uri=https:///api/auth/login&scope=openid offline_access&access_type=offline&response_type=code&prompt=consent&state=235345&nonce=loser + # [enabled为true时必填] OIDC登录跳转地址:请将修改为authhub实际域名, 替换为实际的Client ID,将替换为EulerCopilot域名 + redirect: https:///oauth2/authorize?client_id=&redirect_uri=https:///api/auth/login&scope=openid offline_access&access_type=offline&response_type=code&prompt=consent&state=235345&nonce=loser web: # [必填] 是否部署Web前端用户界面 enabled: true -- Gitee