Merge remote-tracking branch 'origin/main'
| | |
| | | package org.ruoyi.controller; |
| | | |
| | | import cn.dev33.satoken.stp.StpUtil; |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import jakarta.validation.Valid; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.ruoyi.common.chat.config.ChatConfig; |
| | | import org.ruoyi.common.chat.domain.request.ChatRequest; |
| | | import org.ruoyi.common.chat.entity.chat.ChatCompletion; |
| | | import org.ruoyi.common.chat.entity.chat.Message; |
| | | import org.ruoyi.common.chat.openai.OpenAiStreamClient; |
| | | import org.ruoyi.common.core.domain.R; |
| | | import org.ruoyi.common.core.validate.AddGroup; |
| | | import org.ruoyi.common.excel.utils.ExcelUtil; |
| | |
| | | import org.ruoyi.common.mybatis.core.page.TableDataInfo; |
| | | import org.ruoyi.common.satoken.utils.LoginHelper; |
| | | import org.ruoyi.common.web.core.BaseController; |
| | | import org.ruoyi.knowledge.chain.vectorstore.VectorStore; |
| | | import org.ruoyi.knowledge.domain.bo.KnowledgeAttachBo; |
| | | import org.ruoyi.knowledge.domain.bo.KnowledgeFragmentBo; |
| | | import org.ruoyi.knowledge.domain.bo.KnowledgeInfoBo; |
| | |
| | | import org.ruoyi.knowledge.service.IKnowledgeAttachService; |
| | | import org.ruoyi.knowledge.service.IKnowledgeFragmentService; |
| | | import org.ruoyi.knowledge.service.IKnowledgeInfoService; |
| | | import org.ruoyi.system.listener.SSEEventSourceListener; |
| | | import org.ruoyi.system.service.ISseService; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.ruoyi.knowledge.chain.vectorstore.VectorStore; |
| | | import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | private final EmbeddingService embeddingService; |
| | | |
| | | private OpenAiStreamClient openAiStreamClient; |
| | | |
| | | private final ChatConfig chatConfig; |
| | | |
| | | private final ISseService sseService; |
| | | |
| | | /** |
| | | * ç¥è¯åºå¯¹è¯ |
| | | */ |
| | | @PostMapping("/send") |
| | | public SseEmitter send(@RequestBody @Valid ChatRequest chatRequest) { |
| | | |
| | | openAiStreamClient = chatConfig.getOpenAiStreamClient(); |
| | | SseEmitter sseEmitter = new SseEmitter(0L); |
| | | SSEEventSourceListener openAIEventSourceListener = new SSEEventSourceListener(sseEmitter); |
| | | public SseEmitter send(@RequestBody @Valid ChatRequest chatRequest, HttpServletRequest request) { |
| | | List<Message> messages = chatRequest.getMessages(); |
| | | String content = messages.get(messages.size() - 1).getContent().toString(); |
| | | // è·åç¥è¯åºä¿¡æ¯ |
| | | Message message = messages.get(messages.size() - 1); |
| | | StringBuilder sb = new StringBuilder(message.getContent().toString()); |
| | | List<String> nearestList; |
| | | List<Double> queryVector = embeddingService.getQueryVector(content, chatRequest.getKid()); |
| | | List<Double> queryVector = embeddingService.getQueryVector(message.getContent().toString(), chatRequest.getKid()); |
| | | nearestList = vectorStore.nearest(queryVector,chatRequest.getKid()); |
| | | for (String prompt : nearestList) { |
| | | Message sysMessage = Message.builder().content(prompt).role(Message.Role.USER).build(); |
| | | messages.add(sysMessage); |
| | | sb.append("\n####").append(prompt); |
| | | } |
| | | Message userMessage = Message.builder().content(content + (nearestList.size() > 0 ? "\n\n注æï¼åçé®é¢æ¶ï¼é¡»ä¸¥æ ¼æ ¹æ®æç»ä½ çç³»ç»ä¸ä¸æå
容åæè¿è¡åçï¼è¯·ä¸è¦èªå·±åæ¥,åçæ¶ä¿æåæ¥ææ¬çæ®µè½å±çº§" : "") ).role(Message.Role.USER).build(); |
| | | messages.add(userMessage); |
| | | if (chatRequest.getModel().startsWith("ollama")) { |
| | | return sseService.ollamaChat(chatRequest); |
| | | } |
| | | |
| | | ChatCompletion completion = ChatCompletion |
| | | .builder() |
| | | .messages(messages) |
| | | .model(chatRequest.getModel()) |
| | | .temperature(chatRequest.getTemperature()) |
| | | .topP(chatRequest.getTop_p()) |
| | | .stream(true) |
| | | .build(); |
| | | openAiStreamClient.streamChatCompletion(completion, openAIEventSourceListener); |
| | | |
| | | return sseEmitter; |
| | | sb.append( (nearestList.size() > 0 ? "\n\n注æï¼åçé®é¢æ¶ï¼é¡»ä¸¥æ ¼æ ¹æ®æç»ä½ çç³»ç»ä¸ä¸æå
容åæè¿è¡åçï¼è¯·ä¸è¦èªå·±åæ¥,åçæ¶ä¿æåæ¥ææ¬çæ®µè½å±çº§" : "")); |
| | | message.setContent(sb.toString()); |
| | | return sseService.sseChat(chatRequest, request); |
| | | } |
| | | |
| | | /** |
| | |
| | | private String kid; |
| | | |
| | | private String userId; |
| | | |
| | | /** |
| | | * 1 èç½æç´¢ |
| | | */ |
| | | private int chat_type; |
| | | |
| | | /** |
| | | * åºç¨ID |
| | | */ |
| | | private String appId; |
| | | // |
| | | |
| | | // |
| | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | import org.ruoyi.common.chat.entity.chat.tool.ToolCalls; |
| | | |
| | |
| | | public class Message extends BaseMessage implements Serializable { |
| | | |
| | | private Object content; |
| | | @JsonProperty("reasoning_content") |
| | | private String reasoningContent; |
| | | |
| | | public static Builder builder() { |
| | | return new Builder(); |
| | |
| | | |
| | | import cn.dev33.satoken.context.SaHolder; |
| | | import cn.dev33.satoken.context.model.SaStorage; |
| | | import cn.dev33.satoken.session.SaSession; |
| | | import cn.dev33.satoken.stp.SaLoginModel; |
| | | import cn.dev33.satoken.stp.StpUtil; |
| | | import cn.hutool.core.convert.Convert; |
| | |
| | | if (loginUser != null) { |
| | | return loginUser; |
| | | } |
| | | loginUser = (LoginUser) StpUtil.getTokenSession().get(LOGIN_USER_KEY); |
| | | SaSession tokenSession = StpUtil.getTokenSession(); |
| | | if (tokenSession != null) { |
| | | loginUser = (LoginUser) tokenSession.get(LOGIN_USER_KEY); |
| | | SaHolder.getStorage().set(LOGIN_USER_KEY, loginUser); |
| | | }; |
| | | return loginUser; |
| | | } |
| | | |
| | |
| | | import org.ruoyi.common.chat.openai.OpenAiStreamClient; |
| | | import org.ruoyi.knowledge.domain.vo.KnowledgeInfoVo; |
| | | import org.ruoyi.knowledge.service.IKnowledgeInfoService; |
| | | import org.ruoyi.system.domain.SysModel; |
| | | import org.ruoyi.system.service.ISysModelService; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | @Lazy |
| | | @Resource |
| | | private LocalModelsVectorization localModelsVectorization; |
| | | @Lazy |
| | | @Resource |
| | | private ISysModelService sysModelService; |
| | | |
| | | @Getter |
| | | private OpenAiStreamClient openAiStreamClient; |
| | |
| | | @Override |
| | | public List<List<Double>> batchVectorization(List<String> chunkList, String kid) { |
| | | List<List<Double>> vectorList; |
| | | openAiStreamClient = chatConfig.getOpenAiStreamClient(); |
| | | // è·åç¥è¯åºä¿¡æ¯ |
| | | KnowledgeInfoVo knowledgeInfoVo = knowledgeInfoService.queryById(Long.valueOf(kid)); |
| | | if(knowledgeInfoVo == null){ |
| | | log.warn("ç¥è¯åºä¸åå¨:è¯·æ¥æ£ID {}",kid); |
| | | vectorList=new ArrayList<>(); |
| | | vectorList.add(new ArrayList<>()); |
| | | return vectorList; |
| | | } |
| | | SysModel sysModel = sysModelService.selectModelByName(knowledgeInfoVo.getVectorModel()); |
| | | String apiHost= sysModel.getApiHost(); |
| | | String apiKey= sysModel.getApiKey(); |
| | | openAiStreamClient = chatConfig.createOpenAiStreamClient(apiHost,apiKey); |
| | | |
| | | Embedding embedding = buildEmbedding(chunkList, knowledgeInfoVo); |
| | | EmbeddingResponse embeddings = openAiStreamClient.embeddings(embedding); |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢çæä¿¡æ¯ |
| | | * |
| | | */ |
| | | @GetMapping(value = "/configKey/copyright") |
| | | public R<String> getConfigKeyCopyright() { |
| | | return R.ok(configService.getConfigValue("sys","copyright")); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢logoImage |
| | | * |
| | | */ |
| | | @GetMapping(value = "/configKey/logoImage") |
| | | public R<String> getConfigKeyLogoImage() { |
| | | return R.ok(configService.getConfigValue("sys","logoImage")); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç³»ç»åæ° |
| | | * |
| | | */ |
| | |
| | | /** |
| | | * è·åå
¬åå表 |
| | | */ |
| | | @SaCheckPermission("system:notice:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysNoticeVo> list(SysNoticeBo notice, PageQuery pageQuery) { |
| | | //å
¬åç±»åï¼1éç¥ 2å
¬åï¼ |
| | |
| | | */ |
| | | private String updateIp; |
| | | |
| | | /** |
| | | * 模ååç§° |
| | | */ |
| | | private String modelName; |
| | | |
| | | |
| | | /** |
| | | * 模åsystem |
| | | */ |
| | | private String systemPrompt; |
| | | |
| | | } |
| | |
| | | */ |
| | | private String updateIp; |
| | | |
| | | /** |
| | | * 模ååç§° |
| | | */ |
| | | private String modelName; |
| | | |
| | | /** |
| | | * 模åsystem |
| | | */ |
| | | private String systemPrompt; |
| | | |
| | | } |
| | |
| | | @ExcelProperty(value = "æ´æ°IP") |
| | | private String updateIp; |
| | | |
| | | /** |
| | | * 模ååç§° |
| | | */ |
| | | @ExcelProperty(value = "模ååç§°") |
| | | private String modelName; |
| | | |
| | | /** |
| | | * 模åsystem |
| | | */ |
| | | private String systemPrompt; |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | Object content = completionResponse.getChoices().get(0).getDelta().getContent(); |
| | | if(content == null){ |
| | | return; |
| | | content = completionResponse.getChoices().get(0).getDelta().getReasoningContent(); |
| | | if(content == null) return; |
| | | } |
| | | if(StringUtils.isEmpty(modelName)){ |
| | | modelName = completionResponse.getModel(); |
| | |
| | | TenantHelper.clearDynamic(); |
| | | } |
| | | StpUtil.logout(); |
| | | if (loginUser !=null) { |
| | | recordLogininfor(loginUser.getTenantId(), loginUser.getUsername(), Constants.LOGOUT, MessageUtils.message("user.logout.success")); |
| | | } |
| | | } catch (NotLoginException ignored) { |
| | | } |
| | | } |
| | |
| | | import org.ruoyi.system.domain.SysModel; |
| | | import org.ruoyi.system.domain.bo.ChatMessageBo; |
| | | import org.ruoyi.system.domain.request.translation.TranslationRequest; |
| | | import org.ruoyi.system.domain.vo.ChatGptsVo; |
| | | import org.ruoyi.system.listener.SSEEventSourceListener; |
| | | import org.ruoyi.system.service.*; |
| | | import org.springframework.core.io.InputStreamResource; |
| | |
| | | private final ISysModelService sysModelService; |
| | | |
| | | private final ConfigService configService; |
| | | |
| | | private final IChatGptsService chatGptsService; |
| | | |
| | | static final OkHttpClient HTTP_CLIENT = new OkHttpClient().newBuilder().build(); |
| | | |
| | |
| | | chatMessageBo.setContent(chatString); |
| | | |
| | | String model = chatRequest.getModel(); |
| | | // 妿æ¯gptsç³»åæ¨¡å |
| | | if (chatRequest.getModel().startsWith("gpt-4-gizmo")) { |
| | | model = "gpt-4-gizmo"; |
| | | } |
| | | SysModel sysModel = sysModelService.selectModelByName(model); |
| | | if (sysModel == null) { |
| | | // å¦ææ¨¡åä¸åå¨é»è®¤ä½¿ç¨tokenæ£è´¹æ¹å¼ |
| | | processByToken(chatRequest.getModel(), chatString, chatMessageBo); |
| | | } else { |
| | | openAiStreamClient = chatConfig.createOpenAiStreamClient(sysModel.getApiHost(), sysModel.getApiKey()); |
| | | if (StringUtils.isNotEmpty(chatRequest.getAppId())) { // 设置åºç¨çç³»ç»è§è²ä¸ºæè¿° |
| | | ChatGptsVo chatGptsVo = chatGptsService.queryById(Long.valueOf(chatRequest.getAppId())); |
| | | Message sysMessage = Message.builder().content(chatGptsVo.getSystemPrompt()).role(Message.Role.SYSTEM).build(); |
| | | messages.add(0,sysMessage); |
| | | } else { |
| | | // 模å设置é»è®¤æç¤ºè¯ |
| | | if (StringUtils.isNotEmpty(sysModel.getSystemPrompt())) { |
| | | Message sysMessage = Message.builder().content(sysModel.getSystemPrompt()).role(Message.Role.SYSTEM).build(); |
| | | messages.add(sysMessage); |
| | | messages.add(0,sysMessage); |
| | | } |
| | | } |
| | | // 计费类å: 1 tokenæ£è´¹ 2 æ¬¡æ°æ£è´¹ |
| | | if ("2".equals(sysModel.getModelType())) { |
| | |
| | | lqw.like(StringUtils.isNotBlank(bo.getModelShow()), SysModel::getModelShow, bo.getModelShow()); |
| | | lqw.eq(StringUtils.isNotBlank(bo.getModelDescribe()), SysModel::getModelDescribe, bo.getModelDescribe()); |
| | | lqw.eq(StringUtils.isNotBlank(bo.getModelType()), SysModel::getModelType, bo.getModelType()); |
| | | lqw.eq(StringUtils.isNotBlank(bo.getCategory()), SysModel::getCategory, bo.getCategory()); |
| | | return lqw; |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | SET FOREIGN_KEY_CHECKS=0; |
| | | |
| | | ALTER TABLE `ruoyi-org`.`chat_gpts` ADD COLUMN `model_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模ååç§°' AFTER `tenant_id`; |
| | | |
| | | ALTER TABLE `ruoyi-org`.`chat_gpts` ADD COLUMN `system_prompt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ç³»ç»æç¤ºè¯' AFTER `model_name`; |
| | | |
| | | INSERT INTO `ruoyi-ai`.`chat_gpts` (`id`, `gid`, `name`, `logo`, `info`, `author_id`, `author_name`, `use_cnt`, `bad`, `type`, `create_dept`, `create_time`, `create_by`, `update_by`, `update_time`, `remark`, `version`, `del_flag`, `update_ip`, `tenant_id`, `model_name`, `system_prompt`) VALUES (1810602934286237698, 'gpt-4-gizmo-g-RQAWjtI6u', 'ç¿»è¯å©æ', 'https://external-content.duckduckgo.com/ip3/chat.openai.com.ico', 'ä¸è±åè±ä¸ç¿»è¯ä¸å®¶', 'winkey', 'winkey', 0, 0, 'vector', 103, '2024-07-09 17:12:34', '1', '1', '2025-04-07 21:44:11', 'Ms. Smith, the AI-powered Language Teacher, is a revolutionary GPT-based bot that offers personalized language learning experiences in over 20 languages, including Spanish, German, French, English, Chinese, Korean, Japanese, and more\n', NULL, '0', '127.0.0.1', 0, 'deepseek-r1:1.5b', 'ä½ æ¯ä¸ä½ç²¾éåå½è¯è¨çç¿»è¯å¤§å¸\r\n\r\n请å°ç¨æ·è¾å
¥è¯è¯ç¿»è¯æè±ææä¸æ\r\n\r\n==示ä¾è¾åº==\r\n**åæ** : <è¿éæ¾ç¤ºè¦ç¿»è¯çåæä¿¡æ¯>\r\n**ç¿»è¯** : <è¿éæ¾ç¤ºç¿»è¯æè±è¯çç»æ>\r\n==示ä¾ç»æ==\r\n\r\n注æï¼è¯·ä¸¥æ ¼æç¤ºä¾è¿è¡è¾åºï¼è¿åmarkdownæ ¼å¼'); |
| | | INSERT INTO `ruoyi-ai`.`chat_gpts` (`id`, `gid`, `name`, `logo`, `info`, `author_id`, `author_name`, `use_cnt`, `bad`, `type`, `create_dept`, `create_time`, `create_by`, `update_by`, `update_time`, `remark`, `version`, `del_flag`, `update_ip`, `tenant_id`, `model_name`, `system_prompt`) VALUES (1811668415990931458, 'gpt-4-gizmo-g-XbReEL4Uq', 'æ¸
åå
¨ç§å»ç', 'https://external-content.duckduckgo.com/ip3/chat.openai.com.ico', '坿åæ
å¿çå
¨ç§å»çæä¾å¥åº·æå¯¼', NULL, NULL, 0, 0, NULL, 103, '2024-07-12 15:46:24', '1', '1', '2024-07-12 15:46:24', NULL, NULL, '0', NULL, 0, 'deepseek-r1:1.5b', '坿åæ
å¿çå
¨ç§å»çæä¾å¥åº·æå¯¼'); |
| | | INSERT INTO `ruoyi-ai`.`chat_gpts` (`id`, `gid`, `name`, `logo`, `info`, `author_id`, `author_name`, `use_cnt`, `bad`, `type`, `create_dept`, `create_time`, `create_by`, `update_by`, `update_time`, `remark`, `version`, `del_flag`, `update_ip`, `tenant_id`, `model_name`, `system_prompt`) VALUES (1811670922074988545, 'gpt-4-gizmo-g-AphhNRLxt', 'æç¤ºè¯ä¼å', 'https://external-content.duckduckgo.com/ip3/chat.openai.com.ico', 'æ
é¿ä¸ºPrompt æåæ¸
æ°åº¦ååé åç大å¸', NULL, NULL, 0, 0, NULL, 103, '2024-07-12 15:56:22', '1', '1', '2024-07-12 15:56:22', NULL, NULL, '0', NULL, 0, 'deepseek-r1:1.5b', 'æ
é¿ä¸ºPrompt æåæ¸
æ°åº¦ååé åç大å¸'); |
| | | INSERT INTO `ruoyi-ai`.`chat_gpts` (`id`, `gid`, `name`, `logo`, `info`, `author_id`, `author_name`, `use_cnt`, `bad`, `type`, `create_dept`, `create_time`, `create_by`, `update_by`, `update_time`, `remark`, `version`, `del_flag`, `update_ip`, `tenant_id`, `model_name`, `system_prompt`) VALUES (1811815442062188545, 'gpt-4-gizmo-g-ThuHxKi7e', 'å°çº¢ä¹¦ææ¡çæå¨', 'https://external-content.duckduckgo.com/ip3/chat.openai.com.ico', 'å°çº¢ä¹¦ææ¡çæå¨', NULL, NULL, 0, 0, NULL, 103, '2024-07-13 01:30:38', '1', '1', '2024-07-13 01:30:38', NULL, NULL, '0', NULL, 0, 'deepseek-r1:1.5b', 'å°çº¢ä¹¦ææ¡çæå¨'); |
| | | INSERT INTO `ruoyi-ai`.`chat_gpts` (`id`, `gid`, `name`, `logo`, `info`, `author_id`, `author_name`, `use_cnt`, `bad`, `type`, `create_dept`, `create_time`, `create_by`, `update_by`, `update_time`, `remark`, `version`, `del_flag`, `update_ip`, `tenant_id`, `model_name`, `system_prompt`) VALUES (1811817605668741121, 'gpt-4-gizmo-g-AsQCd3k8', 'ä¸å½æ³å¾å©æ', 'https://external-content.duckduckgo.com/ip3/chat.openai.com.ico', 'å
¨é¢ææ¡ä¸å½æ³å¾çæºè½å©æï¼å¯å¸®å©èµ·èæä¹¦ï¼åææ¡ä»¶ï¼è¿è¡æ³å¾å¨è¯¢', NULL, NULL, 0, 0, NULL, 103, '2024-07-13 01:39:14', '1', '1', '2024-07-13 01:39:14', NULL, NULL, '2', NULL, 0, 'deepseek-r1:1.5b', 'å
¨é¢ææ¡ä¸å½æ³å¾çæºè½å©æï¼å¯å¸®å©èµ·èæä¹¦ï¼åææ¡ä»¶ï¼è¿è¡æ³å¾å¨è¯¢'); |
| | | INSERT INTO `ruoyi-ai`.`chat_gpts` (`id`, `gid`, `name`, `logo`, `info`, `author_id`, `author_name`, `use_cnt`, `bad`, `type`, `create_dept`, `create_time`, `create_by`, `update_by`, `update_time`, `remark`, `version`, `del_flag`, `update_ip`, `tenant_id`, `model_name`, `system_prompt`) VALUES (1811817605668741122, 'gpt-4-gizmo-g-IXwub6dJu', 'è±è¯èå¸', 'https://external-content.duckduckgo.com/ip3/chat.openai.com.ico', 'è±è¯å¦ä¹ GPTæ¯ä¸ä¸ªä¸é¨è®¾è®¡æ¥å¸®å©ç¨æ·æé«ä»ä»¬çè±è¯æè½ç人工æºè½å©æ', NULL, NULL, 0, 0, NULL, NULL, NULL, '', '', NULL, NULL, NULL, '0', NULL, 0, 'deepseek-r1:1.5b', 'è±è¯å¦ä¹ GPTæ¯ä¸ä¸ªä¸é¨è®¾è®¡æ¥å¸®å©ç¨æ·æé«ä»ä»¬çè±è¯æè½ç人工æºè½å©æ'); |
| | | |
| | | SET FOREIGN_KEY_CHECKS=1; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `ruoyi-ai`.`chat_model` (`id`, `tenant_id`, `category`, `model_name`, `model_describe`, `model_price`, `model_type`, `model_show`, `system_prompt`, `api_host`, `api_key`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1907575746601119746, '000000', 'vector', 'text-embedding-3-small', 'text-embedding-3-small', 0, '2', '0', NULL, 'https://api.pandarobot.chat/', 'sk-cdBlIaZcufccm2RaDe547cBd054d49C7B0782eCa72A0052b', 103, 1, '2025-04-03 07:27:54', 1, '2025-04-03 07:27:54', 'text-embedding-3-small'); |
| | | INSERT INTO `ruoyi-ai`.`chat_model` (`id`, `tenant_id`, `category`, `model_name`, `model_describe`, `model_price`, `model_type`, `model_show`, `system_prompt`, `api_host`, `api_key`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1907576007017066497, '000000', 'vector', 'quentinz/bge-large-zh-v1.5', 'bge-large-zh-v1.5', 0, '2', '0', NULL, 'https://api.pandarobot.chat/', 'cdBlIaZcufccm2RaDe547cBd054d49C7B0782eCa72A0052b', 103, 1, '2025-04-03 07:28:56', 1, '2025-04-03 07:28:56', 'bge-large-zh-v1.5'); |
| | | INSERT INTO `ruoyi-ai`.`chat_model` (`id`, `tenant_id`, `category`, `model_name`, `model_describe`, `model_price`, `model_type`, `model_show`, `system_prompt`, `api_host`, `api_key`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1907576806191362049, '000000', 'vector', 'nomic-embed-text', 'nomic-embed-text', 0, '2', '0', NULL, 'http://127.0.0.1:11434/', 'nomic-embed-text', 103, 1, '2025-04-03 07:32:06', 1, '2025-04-03 07:32:06', 'nomic-embed-text'); |
| | | INSERT INTO `ruoyi-ai`.`chat_model` (`id`, `tenant_id`, `category`, `model_name`, `model_describe`, `model_price`, `model_type`, `model_show`, `system_prompt`, `api_host`, `api_key`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1907577073490161665, '000000', 'vector', 'snowflake-arctic-embed', 'snowflake-arctic-embed', 0, '2', '0', NULL, 'http://127.0.0.1:11434/', 'snowflake-arctic-embed', 103, 1, '2025-04-03 07:33:10', 1, '2025-04-03 07:33:10', 'snowflake-arctic-embed'); |