初学大模型部署以及案例应用(windows+wsl+dify+mysql+Ollama+Xinference)

article/2025/8/5 7:17:00

大模型部署以及案例应用(windows+wsl+dify+mysql+Ollama+Xinference)

  • 1.wsl 安装
    • ①安装wsl
    • ②测试以及更新
    • ③安装Ubuntu系统
      • 查看系统以及版本
      • 安装Ubuntu系统
      • 进入Ubuntu系统
  • 2、docker安装
    • ①下载安装包
    • ②安装
    • ③docker配置
  • 3、安装dify
    • ①下载dify
    • ②安装
    • ③生成.env 配置文件
    • ④安装dify
    • ⑤打开dify
  • 4.安装ollama
    • ①下载ollama
    • ②安装ollama
    • ③搜索模型
    • ④下载模型
    • ⑤运行模型
  • 5、dify与ollama模型对接
  • ①在dify安装ollama
    • ②配置模型
  • 6、安装conda
    • ①选择对应的版本进行下载。
    • ②修改配置和环境变量
  • 7、安装配置Xinference
    • ①在cmd创建conda环境
    • ②安装相关依赖
    • ③进行安装以及启动
      • 安装
      • 启动
      • xinference启动效果:
    • ④启动模型
    • ⑤xinference与dify对接
      • 安装xinference
      • 添加模型
  • 8、插件的应用
    • 我使用的一些插件
    • 插件下载与安装
      • 也可以通过dify的marketplace直接安装,我测试下载之后安装要快很多。
  • 9、应用
    • ①生成工具
      • 创建工作流
      • dify发布为工具
      • 补充
    • ②工作流
      • 测试效果
      • 用户表结构
  • 10 总结
      • 模型里的SYSTEM 示例

1.wsl 安装

①安装wsl

控制面板–程序–打开启用或关闭windows功能-勾选“使用于Linux的Windows子系统”
打开启用或关闭windows

②测试以及更新

打开cmd,输入wsl --update,若出现“已安装最新版本的适用于 Linux 的 Windows 子系统。”,则无需更新,否则自动更新
在这里插入图片描述

③安装Ubuntu系统

查看系统以及版本

在这里插入图片描述

安装Ubuntu系统

在cmd里面输入:wsl --install -d Ubuntu-24.04 进行安装
在这里插入图片描述

进入Ubuntu系统

方式一:在Windows系统开始搜索Ubuntu-22.04,点击系统管理运行进入
方式二:在CMD里面执行 wsl -d Ubuntu-22.04 进入
在这里插入图片描述

2、docker安装

①下载安装包

去https://www.docker.com/下载exe的安装包

②安装

在CMD里面执行"D:\AI\Docker\Docker Desktop Installer.exe" install --installation-dir=“D:\Docker”,我制定了安装目录的。
在这里插入图片描述

③docker配置

docker一般需要配置两个:
一个是镜像存放位置,二是docker引擎

在这里插入图片描述
在这里插入图片描述

{"builder": {"gc": {"defaultKeepStorage": "20GB","enabled": true}},"default-runtime": "nvidia","experimental": false,"registry-mirrors": ["https://docker-0.unsee.tech","https://docker.1ms.run","https://hub.rat.dev","https://docker.1panel.live","https://hub.rat.dev","https://proxy.1panel.live","https://ghcr.nju.edu.cn","https://docker.registry.cyou","https://dockercf.jsdelivr.fyi","https://docker.rainbond.cc","https://registry.cn-shenzhen.aliyuncs.com","https://dockertest.jsdelivr.fyi","https://mirror.aliyuncs.com","https://mirror.baidubce.com","https://docker.mirrors.ustc.edu.cn","https://docker.mirrors.sjtug.sjtu.edu.cn","https://mirror.iscas.ac.cn","https://docker.nju.edu.cn","https://docker.m.daocloud.io","https://dockerproxy.com","https://docker.jsdelivr.fyi","https://docker-cf.registry.cyou","https://hub.docker.com/"],"runtimes": {"nvidia": {"path": "nvidia-container-runtime","runtimeArgs": []}}
}

3、安装dify

①下载dify

下载地址:https://gitcode.com/gh_mirrors/di/dify

②安装

先解压,然后进入安装目录,例如我的进入指令:cd/d E:\dify-main\docker
在这里插入图片描述

③生成.env 配置文件

dify默认端口是80,如果要修改,则修改.env里面的NGINX_PORT=80 和 EXPOSE_NGINX_PORT=80 两个端口号
在这里插入图片描述

④安装dify

在这里插入图片描述

⑤打开dify

如果默认是80端口,则输入127.0.0.1或者localhost都可以打开
在这里插入图片描述

4.安装ollama

①下载ollama

在https://ollama.com/download进行下载

②安装ollama

安装到其他盘,可以参照:windows部署deepseek与dify

③搜索模型

可以在https://ollama.com/search,进行查找模型,并复制模型名称。
在这里插入图片描述
在这里插入图片描述

④下载模型

在cmd输入:ollama run deepseek-r1:7b,
注意:
大一些的模型对显卡要求比较高,下载后如果满足不了最低要求,则运行不了。
下载模型可以中断,下次输入下载指令可以继续下载
在这里插入图片描述

⑤运行模型

运行模型治理跟下载一样:ollama run deepseek-r1:7b
在这里插入图片描述
查看ollama其他指令可以输入:ollama -h
在这里插入图片描述

5、dify与ollama模型对接

注意docker、Ubuntu、ollama需运行起来

①在dify安装ollama

点击用户头像,点击设置–模型供应商,搜索ollama,并进行安装ollama
在这里插入图片描述
在这里插入图片描述

②配置模型

在模型供应商选择ollama,点击添加模型

http://host.docker.internal:11434

在这里插入图片描述
在这里插入图片描述
模型的类型是根据图标识选择的
在这里插入图片描述

6、安装conda

①选择对应的版本进行下载。

下载地址:ttps://www.anaconda.com/download/success
下载完成之后双击运行.exe文件,然后下一步就行,安装完成之后,进行系统环境变量配置。

②修改配置和环境变量

编辑path系统变量,根据实际安装路径进行配置:

E:\anaconda3
E:\anaconda3\Scripts 
E:\anaconda3\Library\mingw-w64\bin
E:\anaconda3\Library\bin

打开cmd命令窗口,输入 conda --version命令,验证是否配置成功。若成功则会显示具体的版本号。修改Anaconda默认环境保存路径和镜像源:
在C:\Users\Dynasty,找到.condarc,
删除原先内容,进行以下配置。

envs_dirs:- E:\Anaconda_envs\envs
pkgs_dirs:- E:\Anaconda_envs\pkgs
channels:- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/- https://repo.anaconda.com/pkgs/main- https://repo.anaconda.com/pkgs/r- https://repo.anaconda.com/pkgs/msys2- defaults
show_channel_urls: true

在命令窗口中执行conda info命令,我们就可以看到修改后的配置。
在这里插入图片描述

7、安装配置Xinference

参考了Windows下安装部署Xinference

①在cmd创建conda环境

conda create xinference
conda activate xinference

②安装相关依赖

conda install python=3.12
conda install nodejs
pip install torch
在这里插入图片描述

③进行安装以及启动

安装

pip install xinference[all]  -i https://pypi.tuna.tsinghua.edu.cn/simple

指定镜像 -i https://pypi.tuna.tsinghua.edu.cn/simple
在这里插入图片描述

启动

xinference-local --host 192.168.0.104 --port 9997

不要用0.0.0.0,启动会报错,192.168.0.104为本机ip地址
在这里插入图片描述

xinference启动效果:

在这里插入图片描述

④启动模型

选择你需要的模型,点击启动
在这里插入图片描述

⑤xinference与dify对接

参照第5点打开方式

安装xinference

在这里插入图片描述

添加模型

在这里插入图片描述
说明:为什么要安装xinference,dify没有
在这里插入图片描述
这一类的模型。

8、插件的应用

我使用的一些插件

注意database插件的注册链接:

mysql+pymysql://root:root@168.192.0.107:3306/ssm

在这里插入图片描述

插件下载与安装

通过插件下载网址 下载插件
下载后通过安装插件–本地插件–选择插件进行安装
在这里插入图片描述

也可以通过dify的marketplace直接安装,我测试下载之后安装要快很多。

在这里插入图片描述

9、应用

①生成工具

创建工作流

在这里插入图片描述

dify发布为工具

注意:里面的流程是根据实际情况进行操作!有一些人通过这儿设置数据查询工具,然后引入到agent里面,会报错。
在这里插入图片描述

注意:里面的流程是根据实际情况进行操作!有一些人通过这儿设置数据查询工具,然后引入到agent里面,会报错。
一般分为几种情况:
一是:模型太小的原因
二是:引入的知识库的原因
三是:提示词的原因,提示词要越详细越好
四是:没有对引入的对话进行清洗和过滤,因为数据查询仅仅是查询sql,而不包含其他文字性内容
五是:就是我也没有找到原因(有知道的朋友,可以告诉我一下),工具单独测试没有问题

{"data_query": "tool invoke error: Instance <Account at 0x71e62cd38dd0> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: https://sqlalche.me/e/20/bhk3)"}

在这里插入图片描述

在这里插入图片描述

补充

采用现有的database.SQL Execute插件,可以查询出来数据。
在这里插入图片描述
说明:
0-0数据字典为表结构
0-0 提示词用AI实时查询数据库

【角色设定】
您是一位资深数据库专家,擅长根据业务需求将自然语言精准转换为符合规范的SQL语句。您具有以下核心能力:
1. 精通关系型数据库设计,尤其熟悉MySQL语法
2. 深入理解当前业务系统的表结构
[上下文]
3. 能准确识别业务需求中的隐藏条件
4. 熟悉SQL性能优化和事务控制【输入处理流程】
1. 结构确认:先验证涉及的表是否存在,检查字段名是否准确
2. 关联分析:确认多表关联时的连接条件是否正确
3. 条件推导:将模糊的业务描述转化为精确的WHERE条件
4. 异常处理:识别可能存在的逻辑矛盾或性能陷阱【输出要求】
输出sql中不要添加任何注释信息
采用如下格式返回结果:
[符合ANSI标准的SQL语句]
根据输出的SQL,例如:
select * from users
调用工具查询数据,并返回结果

②工作流

根据DY设置的一个工作流
在这里插入图片描述

测试效果

在这里插入图片描述
以下是工作的yml文件内容,新建空白yml文件,拷贝代码并放入里面保存。在diy进行引入即可
在这里插入图片描述

app:description: 测试模型icon: 🤖icon_background: '#FFEAD5'mode: advanced-chatname: 模型测试use_icon_as_answer_icon: false
dependencies:
- current_identifier: nulltype: marketplacevalue:marketplace_plugin_unique_identifier: langgenius/ollama:0.0.6@7d66a960a68cafdcdf5589fdf5d01a995533f956853c69c54eddcf797006fa37
- current_identifier: nulltype: packagevalue:plugin_unique_identifier: jaguarliuu/rookie_text2data:0.3.0@59a0ef957f535edcc661369a3edc3894ce4cd8b8063b296b699ff55c5f6d262d
- current_identifier: nulltype: packagevalue:plugin_unique_identifier: jaguarliuu/rookie_data_alchemy:0.0.4@2be34d32b23be1a447f7822b77dc54462155710ab1cd38d118e562fddbc13cdc
- current_identifier: nulltype: packagevalue:plugin_unique_identifier: bowenliang123/md_exporter:1.4.100@71e015c278af8ae41b80f88a72f03ef92ad01b8db0c3676eafd3f998c4d57601
kind: app
version: 0.3.0
workflow:conversation_variables: []environment_variables: []features:file_upload:allowed_file_extensions:- .JPG- .JPEG- .PNG- .GIF- .WEBP- .SVGallowed_file_types:- imageallowed_file_upload_methods:- local_file- remote_urlenabled: falsefileUploadConfig:audio_file_size_limit: 50batch_count_limit: 5file_size_limit: 15image_file_size_limit: 10video_file_size_limit: 100workflow_file_upload_limit: 10image:enabled: falsenumber_limits: 3transfer_methods:- local_file- remote_urlnumber_limits: 3opening_statement: ''retriever_resource:enabled: truesensitive_word_avoidance:enabled: falsespeech_to_text:enabled: falsesuggested_questions: []suggested_questions_after_answer:enabled: falsetext_to_speech:enabled: falselanguage: ''voice: ''graph:edges:- data:sourceType: starttargetType: llmid: 1748696326544-llmsource: '1748696326544'sourceHandle: sourcetarget: llmtargetHandle: targettype: custom- data:isInIteration: falseisInLoop: falsesourceType: llmtargetType: toolid: llm-source-1748696528530-targetsource: llmsourceHandle: sourcetarget: '1748696528530'targetHandle: targettype: customzIndex: 0- data:isInIteration: falseisInLoop: falsesourceType: tooltargetType: toolid: 1748696528530-source-1748696624432-targetsource: '1748696528530'sourceHandle: sourcetarget: '1748696624432'targetHandle: targettype: customzIndex: 0- data:isInIteration: falseisInLoop: falsesourceType: tooltargetType: if-elseid: 1748696624432-source-1748696664775-targetsource: '1748696624432'sourceHandle: sourcetarget: '1748696664775'targetHandle: targettype: customzIndex: 0- data:isInIteration: falseisInLoop: falsesourceType: if-elsetargetType: llmid: 1748696664775-true-1748696729922-targetsource: '1748696664775'sourceHandle: 'true'target: '1748696729922'targetHandle: targettype: customzIndex: 0- data:isInIteration: falseisInLoop: falsesourceType: llmtargetType: llmid: 1748696729922-source-1748696811184-targetsource: '1748696729922'sourceHandle: sourcetarget: '1748696811184'targetHandle: targettype: customzIndex: 0- data:isInIteration: falseisInLoop: falsesourceType: llmtargetType: toolid: 1748696811184-source-1748696899575-targetsource: '1748696811184'sourceHandle: sourcetarget: '1748696899575'targetHandle: targettype: customzIndex: 0- data:isInIteration: falseisInLoop: falsesourceType: tooltargetType: answerid: 1748696899575-source-answer-targetsource: '1748696899575'sourceHandle: sourcetarget: answertargetHandle: targettype: customzIndex: 0- data:isInIteration: falseisInLoop: falsesourceType: if-elsetargetType: llmid: 1748696664775-6f64ec9a-f939-412f-b673-2bc1a852d5ce-1748697147705-targetsource: '1748696664775'sourceHandle: 6f64ec9a-f939-412f-b673-2bc1a852d5cetarget: '1748697147705'targetHandle: targettype: customzIndex: 0- data:isInIteration: falseisInLoop: falsesourceType: llmtargetType: toolid: 1748697147705-source-1748697966459-targetsource: '1748697147705'sourceHandle: sourcetarget: '1748697966459'targetHandle: targettype: customzIndex: 0- data:isInIteration: falseisInLoop: falsesourceType: tooltargetType: answerid: 1748697966459-source-1748698000525-targetsource: '1748697966459'sourceHandle: sourcetarget: '1748698000525'targetHandle: targettype: customzIndex: 0- data:isInIteration: falseisInLoop: falsesourceType: if-elsetargetType: llmid: 1748696664775-false-1748698025100-targetsource: '1748696664775'sourceHandle: 'false'target: '1748698025100'targetHandle: targettype: customzIndex: 0- data:isInIteration: falseisInLoop: falsesourceType: llmtargetType: answerid: 1748698025100-source-1748698346189-targetsource: '1748698025100'sourceHandle: sourcetarget: '1748698346189'targetHandle: targettype: customzIndex: 0nodes:- data:desc: ''selected: falsetitle: 开始type: startvariables: []height: 53id: '1748696326544'position:x: 30y: 361.5positionAbsolute:x: 30y: 361.5selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:context:enabled: falsevariable_selector: []desc: ''memory:query_prompt_template: '{{#sys.query#}}'role_prefix:assistant: ''user: ''window:enabled: falsesize: 10model:completion_params: {}mode: chatname: qwen2.5vl:7bprovider: langgenius/ollama/ollamaprompt_template:- id: 48eac4f7-06d7-4a91-b28d-112d00f9bbf0role: systemtext: "#角色\n你是一位文字提炼专家\n#任务\n负责把用户的查询数据需求进行提炼和总结,抓取关键数据查询文字,去掉和数据查询无关的内容,只保留提炼查询数据的文字\n\#输出\n注意事项:\n所有非聚合字段必须出现在GROUP BY中,只输出SQL语句,不要解释。输出示例:\n查询用户信息:\nselect\\  *  from users\n查询用户数:\nselect  count(1) from users\n查询大于22岁的用户:\n select\\  * from users where age>22\n查询用户的姓名:\nselect name from users\n统计年龄大22岁的人数:\n\select count(1) from users where age>22\n统计绿色指标表以及指标总得分:\nselect oname,sum(score)\\ from green_item group by oname"selected: falsetitle: LLMtype: llmvariables: []vision:enabled: falseheight: 89id: llmposition:x: 333y: 361.5positionAbsolute:x: 333y: 361.5selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:answer: '{{#1748696899575.text#}}'desc: ''selected: falsetitle: 直接回复type: answervariables: []height: 104id: answerposition:x: 2454y: 361.5positionAbsolute:x: 2454y: 361.5selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:desc: ''is_team_authorization: trueoutput_schema: nullparamSchemas:- auto_generate: nulldefault: nullform: formhuman_description:en_US: Database typeja_JP: Database typept_BR: Database typezh_Hans: 数据库类型label:en_US: Database typeja_JP: Database typept_BR: Database typezh_Hans: 数据库类型llm_description: Database typemax: nullmin: nullname: db_typeoptions:- label:en_US: MySQLja_JP: MySQLpt_BR: MySQLzh_Hans: MySQLvalue: mysql- label:en_US: PostgreSQLja_JP: PostgreSQLpt_BR: PostgreSQLzh_Hans: PostgreSQLvalue: postgresqlplaceholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: select- auto_generate: nulldefault: nullform: formhuman_description:en_US: limitja_JP: limitpt_BR: limitzh_Hans: SQL返回数据量限制label:en_US: limitja_JP: limitpt_BR: limitzh_Hans: SQL返回数据量限制llm_description: limitmax: 1000min: 1name: limitoptions: []placeholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: number- auto_generate: nulldefault: jsonform: formhuman_description:en_US: result_formatja_JP: result_formatpt_BR: result_formatzh_Hans: 返回数据格式label:en_US: result_formatja_JP: result_formatpt_BR: result_formatzh_Hans: 返回数据格式llm_description: result_formatmax: nullmin: nullname: result_formatoptions:- label:en_US: JSONja_JP: JSONpt_BR: JSONzh_Hans: JSONvalue: json- label:en_US: TEXTja_JP: TEXTpt_BR: TEXTzh_Hans: TEXTvalue: textplaceholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: select- auto_generate: nulldefault: nullform: formhuman_description:en_US: Database ip/hostja_JP: Database ip/hostpt_BR: Database ip/hostzh_Hans: 数据库IP/域名label:en_US: Database ip/hostja_JP: Database ip/hostpt_BR: Database ip/hostzh_Hans: 数据库IP/域名llm_description: Database ip/hostmax: nullmin: nullname: hostoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: formhuman_description:en_US: Database portja_JP: Database portpt_BR: Database portzh_Hans: 数据库端口label:en_US: Database portja_JP: Database portpt_BR: Database portzh_Hans: 数据库端口llm_description: Database portmax: 65535min: 1name: portoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: number- auto_generate: nulldefault: nullform: formhuman_description:en_US: Database nameja_JP: Database namept_BR: Database namezh_Hans: 数据库名称label:en_US: Database nameja_JP: Database namept_BR: Database namezh_Hans: 数据库名称llm_description: Database namemax: nullmin: nullname: db_nameoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: llmhuman_description:en_US: table_namesja_JP: table_namespt_BR: table_nameszh_Hans: 数据表名称label:en_US: table_namesja_JP: table_namespt_BR: table_nameszh_Hans: 数据表名称llm_description: table_namesmax: nullmin: nullname: table_namesoptions: []placeholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: llmhuman_description:en_US: Schema nameja_JP: Schema namept_BR: Schema namezh_Hans: 数据库Schema PGSQL用户选填,默认为publiclabel:en_US: Schema nameja_JP: Schema namept_BR: Schema namezh_Hans: 数据库Schema PGSQL用户选填,默认为publicllm_description: Schema namemax: nullmin: nullname: schema_nameoptions: []placeholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: formhuman_description:en_US: Usernameja_JP: Usernamept_BR: Usernamezh_Hans: 用户名label:en_US: Usernameja_JP: Usernamept_BR: Usernamezh_Hans: 用户名llm_description: Usernamemax: nullmin: nullname: usernameoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: formhuman_description:en_US: Passwordja_JP: Passwordpt_BR: Passwordzh_Hans: 密码label:en_US: Passwordja_JP: Passwordpt_BR: Passwordzh_Hans: 密码llm_description: Passwordmax: nullmin: nullname: passwordoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: secret-input- auto_generate: nulldefault: nullform: formhuman_description:en_US: LLM model for text2data.ja_JP: LLM model for text2data.pt_BR: LLM model for text2data.zh_Hans: LLM model for text2data.label:en_US: Modelja_JP: Modelpt_BR: Modelzh_Hans: 模型llm_description: LLM model for text2data.max: nullmin: nullname: modeloptions: []placeholder: nullprecision: nullrequired: truescope: llmtemplate: nulltype: model-selector- auto_generate: nulldefault: nullform: llmhuman_description:en_US: Fetching data from the database using natural language.ja_JP: Fetching data from the database using natural language.pt_BR: Fetching data from the database using natural language.zh_Hans: Fetching data from the database using natural language.label:en_US: Query stringja_JP: Query stringpt_BR: Query stringzh_Hans: 查询语句llm_description: Fetching data from the database using natural language.max: nullmin: nullname: queryoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: llmhuman_description:en_US: custom_promptja_JP: custom_promptpt_BR: custom_promptzh_Hans: 自定义提示label:en_US: custom_promptja_JP: custom_promptpt_BR: custom_promptzh_Hans: 自定义提示llm_description: custom_promptmax: nullmin: nullname: custom_promptoptions: []placeholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: formhuman_description:en_US: with_commentja_JP: with_commentpt_BR: with_commentzh_Hans: 是否包含注释label:en_US: with_commentja_JP: with_commentpt_BR: with_commentzh_Hans: 是否包含注释llm_description: with_commentmax: nullmin: nullname: with_commentoptions: []placeholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: booleanparams:custom_prompt: ''db_name: ''db_type: ''host: ''limit: ''model: ''password: ''port: ''query: ''result_format: ''schema_name: ''table_names: ''username: ''with_comment: ''provider_id: jaguarliuu/rookie_text2data/rookie_text2dataprovider_name: jaguarliuu/rookie_text2data/rookie_text2dataprovider_type: builtinselected: falsetitle: rookie_text2datatool_configurations:db_name: ssmdb_type: mysqlhost: 192.168.0.107limit: nullmodel:completion_params: {}mode: chatmodel: qwen2.5vl:7bmodel_type: llmprovider: langgenius/ollama/ollamatype: model-selectorpassword: jiang1987port: 3306result_format: textusername: ssmwith_comment: 1tool_description: 使用自然语言从MySQL获取数据tool_label: rookie_text2datatool_name: rookie_text2datatool_parameters:custom_prompt:type: mixedvalue: '绿色指标表表注释表名称:green_item-id:主键ID,int-oname:一级指标,varchar(255)-sname:二级指标,varchar(255)-tname:三级指标,varchar(255)-score:绿色分值,int事项表表注释表名称:item_dic-id:字典主键,int-tid:上级主键,int-name:事项名称,varchar(255)-item_name:细项名称,varchar(255)-score:等分,int##菜单表表注释表名称:menus-mid:菜单主键,int-mfid:上级主键,int-mname:菜单名称,varchar(255)-murl:菜单链接,varchar(255)角色表表注释表名称:roles-rid:角色主键,int-rname:角色名称,varchar(255)角色表表注释表名称:users-id:主键ID,int-name:姓名,varchar(255)-age:年龄,int注意事项:- 如有分组统计,请使用SUM、AVG等聚合函数,不要直接用原始字段。- 所有非聚合字段必须出现在GROUP BY中。- 只输出SQL语句,不要解释。'query:type: mixedvalue: '{{#llm.text#}}'table_names:type: mixedvalue: green_item,item_dic,menus,roles,userstype: toolheight: 323id: '1748696528530'position:x: 636y: 361.5positionAbsolute:x: 636y: 361.5selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:desc: ''is_team_authorization: trueoutput_schema: nullparamSchemas:- auto_generate: nulldefault: nullform: formhuman_description:en_US: Database typeja_JP: Database typept_BR: Database typezh_Hans: 数据库类型label:en_US: Database typeja_JP: Database typept_BR: Database typezh_Hans: 数据库类型llm_description: Database typemax: nullmin: nullname: db_typeoptions:- label:en_US: MySQLja_JP: MySQLpt_BR: MySQLzh_Hans: MySQLvalue: mysql- label:en_US: PostgreSQLja_JP: PostgreSQLpt_BR: PostgreSQLzh_Hans: PostgreSQLvalue: postgresqlplaceholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: select- auto_generate: nulldefault: nullform: formhuman_description:en_US: Database ip/hostja_JP: Database ip/hostpt_BR: Database ip/hostzh_Hans: 数据库IP/域名label:en_US: Database ip/hostja_JP: Database ip/hostpt_BR: Database ip/hostzh_Hans: 数据库IP/域名llm_description: Database ip/hostmax: nullmin: nullname: hostoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: formhuman_description:en_US: Database portja_JP: Database portpt_BR: Database portzh_Hans: 数据库端口label:en_US: Database portja_JP: Database portpt_BR: Database portzh_Hans: 数据库端口llm_description: Database portmax: 65535min: 1name: portoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: number- auto_generate: nulldefault: nullform: formhuman_description:en_US: Database nameja_JP: Database namept_BR: Database namezh_Hans: 数据库名称label:en_US: Database nameja_JP: Database namept_BR: Database namezh_Hans: 数据库名称llm_description: Database namemax: nullmin: nullname: db_nameoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: formhuman_description:en_US: Usernameja_JP: Usernamept_BR: Usernamezh_Hans: 用户名label:en_US: Usernameja_JP: Usernamept_BR: Usernamezh_Hans: 用户名llm_description: Usernamemax: nullmin: nullname: usernameoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: formhuman_description:en_US: Passwordja_JP: Passwordpt_BR: Passwordzh_Hans: 密码label:en_US: Passwordja_JP: Passwordpt_BR: Passwordzh_Hans: 密码llm_description: Passwordmax: nullmin: nullname: passwordoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: secret-input- auto_generate: nulldefault: nullform: llmhuman_description:en_US: Schema nameja_JP: Schema namept_BR: Schema namezh_Hans: 数据库Schema PGSQL用户选填,默认为publiclabel:en_US: Schema nameja_JP: Schema namept_BR: Schema namezh_Hans: 数据库Schema PGSQL用户选填,默认为publicllm_description: Schema namemax: nullmin: nullname: schemaoptions: []placeholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: llmhuman_description:en_US: Fetching data from the database using natural language.ja_JP: Fetching data from the database using natural language.pt_BR: Fetching data from the database using natural language.zh_Hans: Fetching data from the database using natural language.label:en_US: SQL stringja_JP: SQL stringpt_BR: SQL stringzh_Hans: 待执行的 SQL 语句llm_description: Fetching data from the database using natural language.max: nullmin: nullname: sqloptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: string- auto_generate: nulldefault: jsonform: formhuman_description:en_US: result_formatja_JP: result_formatpt_BR: result_formatzh_Hans: 返回数据格式label:en_US: result_formatja_JP: result_formatpt_BR: result_formatzh_Hans: 返回数据格式llm_description: result_formatmax: nullmin: nullname: result_formatoptions:- label:en_US: JSONja_JP: JSONpt_BR: JSONzh_Hans: JSONvalue: json- label:en_US: TEXTja_JP: TEXTpt_BR: TEXTzh_Hans: TEXTvalue: text- label:en_US: CSVja_JP: CSVpt_BR: CSVzh_Hans: CSVvalue: csvplaceholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: selectparams:db_name: ''db_type: ''host: ''password: ''port: ''result_format: ''schema: ''sql: ''username: ''provider_id: jaguarliuu/rookie_text2data/rookie_text2dataprovider_name: jaguarliuu/rookie_text2data/rookie_text2dataprovider_type: builtinselected: falsetitle: rookie_excute_sqltool_configurations:db_name: ssmdb_type: mysqlhost: 192.168.0.107password: jiang1987port: 3306result_format: textusername: ssmtool_description: sql 执行器tool_label: rookie_excute_sqltool_name: rookie_excute_sqltool_parameters:sql:type: mixedvalue: '{{#llm.text#}}'type: toolheight: 245id: '1748696624432'position:x: 939y: 361.5positionAbsolute:x: 939y: 361.5selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:cases:- case_id: 'true'conditions:- comparison_operator: containsid: 0e10be77-29c5-466c-b950-07548022a669value:varType: stringvariable_selector:- sys- queryid: 'true'logical_operator: and- case_id: 6f64ec9a-f939-412f-b673-2bc1a852d5ceconditions:- comparison_operator: containsid: f52c2ed9-0a5d-4e8f-8bff-01b13742d267value: excelvarType: stringvariable_selector:- sys- query- comparison_operator: containsid: 4b0a8f85-7221-4d02-acf4-f709c707d7fbvalue: ExcelvarType: stringvariable_selector:- sys- query- comparison_operator: containsid: 64c7dc5d-2c3c-4786-8cec-f7db37057475value: EXCELvarType: stringvariable_selector:- sys- queryid: 6f64ec9a-f939-412f-b673-2bc1a852d5celogical_operator: anddesc: ''selected: falsetitle: 条件分支type: if-elseheight: 225id: '1748696664775'position:x: 1242y: 361.5positionAbsolute:x: 1242y: 361.5selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:context:enabled: falsevariable_selector: []desc: ''model:completion_params: {}mode: chatname: qwen2.5vl:7bprovider: langgenius/ollama/ollamaprompt_template:- id: 7f02bbf8-3196-4a90-9405-482a585afcc8role: systemtext: '#任务根据用户需求,以及数据内容,自行判断哪种图表类型适合#输出只输入你推荐的图表类型名称,从以下类型中选择一个输出:柱状图、折线图、饼图,散点图,矩形树图'- id: 5c0fe9be-9e09-4679-b247-aeab12cdc8bbrole: usertext: '用户问题:{{#sys.query#}}数据库数据:{{#1748696528530.text#}}'selected: falsetitle: 图表判断器type: llmvariables: []vision:enabled: falseheight: 89id: '1748696729922'position:x: 1545y: 361.5positionAbsolute:x: 1545y: 361.5selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:context:enabled: falsevariable_selector: []desc: ''model:completion_params: {}mode: chatname: qwen2.5vl:7bprovider: langgenius/ollama/ollamaprompt_template:- id: 802dc976-d7c7-4222-b8a8-2ca473820037role: systemtext: '#任务请将用户提供的文档内容转化为标准的json内容,不包含“josn”的标签,只输出标准josn'- id: 67ebe4d2-123c-499c-8d8b-dc20c34f7600role: usertext: 用户提供的文档内容:{{#1748696624432.text#}}selected: falsetitle: 转JOSN LLM3type: llmvariables: []vision:enabled: falseheight: 89id: '1748696811184'position:x: 1848y: 361.5positionAbsolute:x: 1848y: 361.5selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:desc: ''is_team_authorization: trueoutput_schema: nullparamSchemas:- auto_generate: nulldefault: nullform: formhuman_description:en_US: LLM model for rookie_data_alchemy.ja_JP: LLM model for rookie_data_alchemy.pt_BR: LLM model for rookie_data_alchemy.zh_Hans: LLM model for rookie_data_alchemy.label:en_US: Modelja_JP: Modelpt_BR: Modelzh_Hans: 模型llm_description: LLM model for text2data.max: nullmin: nullname: modeloptions: []placeholder: nullprecision: nullrequired: truescope: llmtemplate: nulltype: model-selector- auto_generate: nulldefault: nullform: llmhuman_description:en_US: wait for dataja_JP: wait for datapt_BR: wait for datazh_Hans: 待处理的数据,建议为json格式或mdlabel:en_US: dataja_JP: datapt_BR: datazh_Hans: 待处理的数据,建议为json格式或mdllm_description: wait for datamax: nullmin: nullname: dataoptions: []placeholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: llmhuman_description:en_US: titleja_JP: titlept_BR: titlezh_Hans: 图表标题,不填则大模型推理生成label:en_US: titleja_JP: titlept_BR: titlezh_Hans: 图表标题,不填则大模型推理生成llm_description: titlemax: nullmin: nullname: titleoptions: []placeholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: llmhuman_description:en_US: chart typeja_JP: chart typept_BR: chart typezh_Hans: 图表类型label:en_US: chart typeja_JP: chart typept_BR: chart typezh_Hans: 图表类型llm_description: chart typemax: nullmin: nullname: chart_typeoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: llmhuman_description:en_US: custom requirementsja_JP: custom requirementspt_BR: custom requirementszh_Hans: 自定义需求label:en_US: custom requirementsja_JP: custom requirementspt_BR: custom requirementszh_Hans: 自定义需求llm_description: custom requirementsmax: nullmin: nullname: custom_requirementsoptions: []placeholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: stringparams:chart_type: ''custom_requirements: ''data: ''model: ''title: ''provider_id: jaguarliuu/rookie_data_alchemy/rookie_data_alchemyprovider_name: jaguarliuu/rookie_data_alchemy/rookie_data_alchemyprovider_type: builtinselected: falsetitle: rookie_data_alchemytool_configurations:model:completion_params: {}mode: chatmodel: deepseek-r1:7bmodel_type: llmprovider: langgenius/ollama/ollamatype: model-selectortool_description: Visualizing structured data as chartstool_label: rookie_data_alchemytool_name: rookie_data_alchemytool_parameters:chart_type:type: mixedvalue: '{{#1748696729922.text#}}'custom_requirements:type: mixedvalue: ''data:type: mixedvalue: '{{#1748696811184.text#}}'title:type: mixedvalue: ''type: toolheight: 89id: '1748696899575'position:x: 2151y: 361.5positionAbsolute:x: 2151y: 361.5selected: truesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:context:enabled: falsevariable_selector: []desc: ''model:completion_params: {}mode: chatname: qwen2.5vl:7bprovider: langgenius/ollama/ollamaprompt_template:- id: 2d5be626-1a76-4d04-bc8c-2f57cae3fe96role: systemtext: '#任务把数据库数据转化为表格类型的markdown文本内容,并把表头翻译为中文#输出只输出转化后的表格类型的markdown,不是要“''“markdown\n”''”等语言标签,只输出标准的markdown表格'- id: 9d64935a-8b00-4d2c-ad97-f6a46a113a36role: usertext: ''selected: falsetitle: 转markdown格式type: llmvariables: []vision:enabled: falseheight: 89id: '1748697147705'position:x: 1545y: 498positionAbsolute:x: 1545y: 498selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:desc: ''is_team_authorization: trueoutput_schema: nullparamSchemas:- auto_generate: nulldefault: nullform: llmhuman_description:en_US: Markdown table textja_JP: Markdown table textpt_BR: Markdown table textzh_Hans: Markdown格式文本,必须为Markdown表格格式,可包含多个表格label:en_US: Markdown textja_JP: Markdown textpt_BR: Markdown textzh_Hans: Markdown格式文本llm_description: ''max: nullmin: nullname: md_textoptions: []placeholder: nullprecision: nullrequired: truescope: nulltemplate: nulltype: string- auto_generate: nulldefault: nullform: llmhuman_description:en_US: Filename of the output fileja_JP: Filename of the output filept_BR: Filename of the output filezh_Hans: 输出文件名label:en_US: Filename of the output fileja_JP: Filename of the output filept_BR: Filename of the output filezh_Hans: 输出文件名llm_description: ''max: nullmin: nullname: output_filenameoptions: []placeholder: nullprecision: nullrequired: falsescope: nulltemplate: nulltype: stringparams:md_text: ''output_filename: ''provider_id: bowenliang123/md_exporter/md_exporterprovider_name: bowenliang123/md_exporter/md_exporterprovider_type: builtinselected: falsetitle: Markdown转XLSX文件tool_configurations: {}tool_description: 一个用于将Markdown转换为XLSX文件的工具tool_label: Markdown转XLSX文件tool_name: md_to_xlsxtool_parameters:md_text:type: mixedvalue: '{{#1748697147705.text#}}'output_filename:type: mixedvalue: ''type: toolheight: 53id: '1748697966459'position:x: 1848y: 516positionAbsolute:x: 1848y: 516sourcePosition: righttargetPosition: lefttype: customwidth: 243- data:answer: '{{#sys.files#}}'desc: ''selected: falsetitle: 直接回复 2type: answervariables: []height: 104id: '1748698000525'position:x: 2151y: 490.5positionAbsolute:x: 2151y: 490.5selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:context:enabled: falsevariable_selector: []desc: ''model:completion_params: {}mode: chatname: qwen2.5vl:7bprovider: langgenius/ollama/ollamaprompt_template:- id: d05a33f6-5888-41db-8533-fbe04d312a19role: systemtext: '#角色你是一个精通数据处理、分析和总结的大师#任务你可以根据用户的问题,从提供的数据库中检索相关信息,整合提炼后用精准合适的自然语言来回复用户#输出1.若用户只是查询数据,则提炼之后直接回复数据即可2.如果用户需要你分析和综合数据,则你结合数据来给出专业的分析内容'- id: 0f415532-e56c-4c51-a004-9658d13aa3berole: usertext: '用户的问题:{{#sys.query#}}数据库数据:{{#1748696624432.text#}}'selected: falsetitle: LLM 5type: llmvariables: []vision:enabled: falseheight: 89id: '1748698025100'position:x: 1545y: 627positionAbsolute:x: 1545y: 627selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243- data:answer: '{{#1748698025100.text#}}'desc: ''selected: falsetitle: 总结分析type: answervariables: []height: 104id: '1748698346189'position:x: 1848y: 619.5positionAbsolute:x: 1848y: 619.5selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 243viewport:x: -964.6500000000001y: -95.05000000000001zoom: 0.7

用户表结构

DROP TABLE IF EXISTS `users`;
CREATE TABLE `users`  (`id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '姓名',`age` int(0) NULL DEFAULT NULL COMMENT '年龄',PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户信息' ROW_FORMAT = Dynamic;SET FOREIGN_KEY_CHECKS = 1;

10 总结

从接触模型以来,也没有几天,不断的通过网上的知识进行研究和学习,文档内容如有不对对请指正。感谢!!!!

模型里的SYSTEM 示例

#角色
你是一个专业的数据分析专家,并且精通根据用户的问题、数据表结构进行生成SQL语句进行查询数据库。
#任务
1.负责把用户的查询数据需求进行提炼和总结,抓取关键数据查询文字,去掉和数据查询无关的内容,只保留提炼查询数据的文字
2.根据用户的问题,准确确定用户需求,首先查看数据库表中的数据表结构,然后编写准确的并且可直接运行的SQL语句进行统计和查询数据库中的数据,并且返回相关数据,对于用户的工作效率提升十分重要。
#输出
注意事项:
所有非聚合字段必须出现在GROUP BY中,只输出SQL语句,不要解释。输出示例:查询用户信息:
select  *  from users
查询用户数:
select  count(1) from users

角色定义你模型的作用
任务:任务一定要写详细、清楚、简洁
输出:输出的内容进行描述,示例针对sql查询或者调用图表,模型会根据你的示例进行处理,比如查询用户的示例select * from users,如果在对话中输入查询角色信息,则模型自动会调整为select * from roles,但是如果你输入的是展示角色信息,那么就可能模型就识别不了(跟模型理解有关)。

USER和ASSISTANT 待研究


http://www.hkcw.cn/article/QEhwyPsRmH.shtml

相关文章

【Linux系统编程】Ext系列文件系统

目录 磁盘文件系统的必要性 认识磁盘结构 理解硬件 磁盘的物理结构 磁盘的存储结构 磁盘的逻辑结构 引入磁盘文件系统 引入"块"概念 引入"分区"概念 引入"分组"概念 ext*系列文件系统 inode、inode Bitmap、inode Table Block Bitm…

基于ZYNQ ARM+FPGA异构平台的声呐数据采集系统设计

0 引 言 近年来&#xff0c;随着海洋工程技术的发展&#xff0c;水下无人 航行器 (underwater unmanned vehicle, UUV)) 因其 灵活性、低风险性以及多功能性的优点&#xff0c;在维护国 家海洋权益以及海洋安全发挥着日益重要的作用 [1-3] 。 UUV 在完成目标搜索、…

前端基础学习html+css+js

HTML 区块 div标签&#xff0c;块级标签 span包装小部分文本&#xff0c;行内元素 表单 CSS css选择器 css属性 特性blockinlineinline-block是否换行✅ 换行❌ 不换行❌ 不换行可设置宽高✅ 支持❌ 不支持✅ 支持常见元素div容器 p段落 h标题span文本容器 a超链接img图片…

Client-Side Path Traversal 漏洞学习笔记

近年来,随着Web前端技术的飞速发展,越来越多的数据请求和处理逻辑被转移到客户端(浏览器)执行。这大大提升了用户体验,但也带来了新的安全威胁。其中,Client-Side Path Traversal(客户端路径穿越,CSPT)作为一种新兴的漏洞类型,逐渐受到安全研究者和攻击者的关注。本文…

关于神经网络中的梯度和神经网络的反向传播以及梯度与损失的关系

这篇博客用通俗的话介绍一下什么是梯度以及神经网络中的反向传播。 什么是梯度 可以把神经网络想象成一个 “猜答案的机器”。比如你让它猜一张图片是不是猫&#xff0c;它会先 “猜” 一个概率&#xff08;比如猜是猫的概率是 30%&#xff09;&#xff0c;然后你告诉它 “猜…

保持本地Git仓库与远程仓库同步-业务场景示例

业务场景&#xff1a;团队协作开发电商网站 背景&#xff1a; 5人团队使用GitHub协作开发Node.js电商项目。每位开发者负责独立功能模块&#xff08;如支付、商品展示、购物车&#xff09;。核心痛点&#xff1a;频繁出现本地代码与远程仓库冲突&#xff0c;导致测试环境部署失…

【中国企业数字化转型之路】企业的资源投入与数字化转型的产出效益平衡探索(上篇)

在数字化转型的浪潮中&#xff0c;企业面临着前所未有的挑战与机遇。这一转型过程不仅需要大量的技术、人才、管理和时间投入&#xff0c;更需要在投入与产出之间找到精准的平衡点&#xff0c;以确保转型的效益最大化。技术投入方面&#xff0c;企业需斥巨资引进云计算、大数据…

AR/MR实时光照阴影开发教程

一、效果演示 1、PICO4 Ultra MR 发光的球 2、AR实时光照 二、实现原理 PICO4 Ultra MR开发时&#xff0c;通过空间网格能力扫描周围环境&#xff0c;然后将扫描到的环境网格材质替换为一个透明材质并停止扫描&#xff1b;基于Google ARCore XR Plugin和ARFoundation进行安卓手…

图文详解Java集合面试题

文章目录 1、集合框架2、ArrayList、LinkedList3、HashMap、红黑树4、HashMap的put流程 1、集合框架 两条大支线&#xff1a; ①Collection接口&#xff1a;最基本的集合框架&#xff0c;提供添加、删除、清空等基本操作&#xff0c;主要有三个子接口&#xff1a;i&#xff1a…

深度学习|pytorch基本运算-乘除法和幂运算

【1】引言 前序学习进程中&#xff0c;已经对pytorch张量数据的生成和广播做了详细探究&#xff0c;文章链接为&#xff1a; 深度学习|pytorch基本运算-CSDN博客 深度学习|pytorch基本运算-广播失效-CSDN博客 上述探索的内容还止步于张量的加减法&#xff0c;在此基础上&am…

Python Day39 学习(复习日志Day4)

复习Day4日志内容 浙大疏锦行 补充: 关于“类”和“类的实例”的通俗易懂的例子 补充&#xff1a;如何判断是用“众数”还是“中位数”填补空缺值&#xff1f; 今日复习了日志Day4的内容&#xff0c;感觉还是得在纸上写一写印象更深刻&#xff0c;接下来几日都采取“纸质化复…

深度解析微服务网关:APISIX、Higress 与 Spring Cloud Gateway 技术对比与实战指南

一、引言 在微服务架构的演进中,API 网关作为流量入口的核心枢纽,其技术选型直接影响系统的性能、可扩展性和安全性。本文将从技术架构、核心功能、性能工程、生态体系等维度,对当前主流的三款网关 ——Apache APISIX(以下简称 APISIX)、Higress、Spring Cloud Gateway(…

rsync服务的搭建

目录 一、rsync介绍 rsync的安装 二、rsync的语法 三、rsync命令使用 1. 本机同步 2. 远程同步 四、rsync作为服务使用 1、尝试启动rsync程序 2、rsync的配置文件介绍 注意事项&#xff1a; 3. rsyncinotify实时同步 3.依赖服务托管xinetd&#xff08;CentOS 6中rs…

UE5.4.4+Rider2024.3.7开发环境配置

文章目录 一、UE5安装 安装有两种方式一种的源码编译安装、一种是EPIC安装&#xff0c;推荐后者&#xff0c;只需要注册一个EPIC账号就可以一键安装。 二、C环境安装 1.下载VisualStudioSetup 下载链接如下下载 Visual Studio Tools - 免费安装 Windows、Mac、Linux 选择社…

spining-lidar的电机和激光雷达体(lidar-imu)之间的标定

一、使用的是面结构标定 也就是用场景中的面结构来约束标定。 二、电机转轴和激光雷达之间的参数有哪些&#xff1f; 1.位置方面&#xff0c;显然&#xff0c;电机转轴是没有高度的&#xff0c;所以优化的相对量就是detax和detaY. 2.角度方面&#xff0c;显然&#xff0c;一开…

内存管理 : 06 内存换出

内存换出的重要性及与换入的关系 现在我们讲第25讲&#xff0c;主题是内存的换出&#xff08;swipe out&#xff09;。实际上&#xff0c;上一讲我们讲的是内存的换入&#xff0c;而这一节聚焦于内存的换出。 换入和换出必须合在一起工作&#xff0c;不能只有换入而没有换出。…

SAP财务过账BAPI函数使用以及代码

本文只是整理备用大部分整理自&#xff1a;https://www.cnblogs.com/chaguoguo/p/14006892.html 一、BAPI介绍 BAPI_ACC_GL_POSTING_POST&#xff1a; 主要用于处理总账凭证的过账。 它允许外部系统或程序直接向SAP的总账模块发送过账请求&#xff0c;而无需通过传统的用户…

PyTorch ——torchvision数据集使用

如果下载的很慢&#xff0c;可以试试下面这个

C#里与嵌入式系统W5500网络通讯(4)

怎么样修改W5500里的socket收发缓冲区呢? 需要进行下面的工作,首先要了解socket缓冲区的作用,接着了解缓冲区的硬件资源, 最后就是要了解自己的需求,比如自己需要哪个socket的收发送缓冲区多大。 硬件的寄存器为: 这是 W5500 数据手册中关于 Sn_RXBUF_SIZE(Socket n …

【PostgreSQL 04】PostgreSQL性能飞跃指南:从慢查询到服务器配置的全栈优化实战

PostgreSQL性能飞跃指南&#xff1a;从慢查询到服务器配置的全栈优化实战 关键词&#xff1a; PostgreSQL性能优化、查询优化、数据库调优、执行计划、索引优化、服务器配置、EXPLAIN分析、数据库性能监控 摘要&#xff1a; 你的PostgreSQL查询慢得像蜗牛爬行&#xff1f;数据库…