【wails】(6):使用wails做桌面应用开发,使用gin+go-chatglm.cpp进行本地模型运行,在windows上运行成功

1,整体架构说明

主要使用,参考的开源项目是:
https://github.com/wailsapp/wails

前端项目:

https://github.com/Chanzhaoyu/chatgpt-web

运行模型:
https://github.com/Weaxs/go-chatglm.cpp

参考代码:
https://github.com/Arvintian/chatgpt-web

模型下载地址的chatglm3量化ggml版本:
https://hf-mirror.com/Chars/chatglm3-ggml/tree/main

modescope 下载:
https://modelscope.cn/models/Xorbits/chatglm3-ggml/files

2,windows上安装软件,golang,nodejs

https://golang.google.cn/dl/


windows 安装 git 工具

https://registry.npmmirror.com/binary.html?path=git-for-windows/

选择上一个稳定版本:
https://registry.npmmirror.com/binary.html?path=git-for-windows/v2.43.0.windows.1/

然后安装 wails 软件:

https://wails.io/zh-Hans/docs/gettingstarted/installation

安装 go 环境配置国内源 :

bash 复制代码
go env -w GOPROXY=https://goproxy.cn,direct
或者:
export GOPROXY=https://goproxy.cn,direct

运行 安装 Wails CLI:

bash 复制代码
go install github.com/wailsapp/wails/v2/cmd/wails@latest 

执行 doctor 命令:
PS C:\Go\src> wails doctor
          Wails Doctor
# Wails
Version | v2.8.0
# System
┌─────────────────────────────────────────────────────────────────────────────────────────────────┐
| OS           | Windows 10 Home China                                                            |
| Version      | 2009 (Build: 22621)                                                              |
| ID           | 22H2                                                                             |
| Go Version   | go1.22.0                                                                         |
| Platform     | windows                                                                          |
| Architecture | amd64                                                                            |
| CPU          | AMD Ryzen 7 5700U with Radeon Graphics                                           |
| GPU          | AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.) - Driver: 30.0.14064.6002 |
| Memory       | 16GB                                                                             |
└─────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────┐
| Dependency | Package Name | Status    | Version        |
| WebView2   | N/A          | Installed | 121.0.2277.128 |
| Nodejs     | N/A          | Installed | 20.11.0        |
| npm        | N/A          | Installed | 10.2.4         |
| *upx       | N/A          | Available |                |
| *nsis      | N/A          | Available |                |
└─────────────── * - Optional Dependency ────────────────┘

# Diagnosis
Optional package(s) installation details:
  - upx : Available at https://upx.github.io/
  - nsis : More info at https://wails.io/docs/guides/windows-installer/

 SUCCESS  Your system is ready for Wails development!

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

4,演示效果,可以在本地CPU上运行chatglm3模型带UI界面

相关推荐
showyoui10 分钟前
Python 闭包(Closure)实战总结
开发语言·python
今天背单词了吗98015 分钟前
算法学习笔记:7.Dijkstra 算法——从原理到实战,涵盖 LeetCode 与考研 408 例题
java·开发语言·数据结构·笔记·算法
Eiceblue17 分钟前
使用 C# 发送电子邮件(支持普通文本、HTML 和附件)
开发语言·c#·html·visual studio
小小小小王王王22 分钟前
hello判断
开发语言·c#
苦夏木禾1 小时前
js请求避免缓存的三种方式
开发语言·javascript·缓存
超级土豆粉2 小时前
Turndown.js: 优雅地将 HTML 转换为 Markdown
开发语言·javascript·html
wei_shuo3 小时前
飞算 JavaAI 开发助手:深度学习驱动下的 Java 全链路智能开发新范式
java·开发语言·飞算javaai
熊猫钓鱼>_>3 小时前
用Python解锁图像处理之力:从基础到智能应用的深度探索
开发语言·图像处理·python
GO兔3 小时前
开篇:GORM入门——Go语言的ORM王者
开发语言·后端·golang·go
好开心啊没烦恼3 小时前
Python 数据分析:numpy,抽提,整数数组索引与基本索引扩展(元组传参)。听故事学知识点怎么这么容易?
开发语言·人工智能·python·数据挖掘·数据分析·numpy·pandas