This commit is contained in:
root 2025-02-08 23:29:02 +08:00
parent 3a49081a05
commit c63224054c
4 changed files with 26 additions and 9 deletions

View File

@ -10,17 +10,17 @@ https://shylinux.com
## 安装 ollama-story ## 安装 ollama-story
打开 ContextOS 的应用商店,下载 20250208-ollama-story。 打开 ContextOS 的应用商店,下载 20250208-ollama-story。
```sh ```sh
http://localhost:9020/c/store?debug=true#2025-ContextOS http://localhost:9020/c/store#2025-ContextOS
``` ```
## 使用 ollama-story ## 使用 ollama-story
打开 web.chat.ollama.chat 的应用。 打开 web.chat.ollama.chat 的应用。
```sh ```sh
http://localhost:9020/s/20250208-ollama-story/c/web.chat.ollama.chat?debug=true http://localhost:9020/s/20250208-ollama-story/c/web.chat.ollama.chat
``` ```
## 查看 ollama-story ## 查看 ollama-story
打开 web.chat.ollama.chat 的源码。 打开 web.chat.ollama.chat 的源码。
```sh ```sh
http://localhost:9020/s/20250208-ollama-story/c/vimer?path=src/&file=client/chat.go&line=1&debug=true#src/:client/chat.go:24 http://localhost:9020/s/20250208-ollama-story/c/vimer?path=src/&file=client/chat.go&line=1#src/:client/chat.go:24
``` ```

View File

@ -1,5 +1,6 @@
$content>div.message { padding:20px; overflow:auto; } $content { padding:20px; }
$content>div.message>div.request { background-color:#94ec69; color:black; padding:10px; float:right; } $content>div.message { padding:0px; overflow:auto; }
$content>div.message>div.request { background-color:#94ec69; color:black; padding:10px; float:right; clear:both; }
$content>div.message>div.request>span { float:right; } $content>div.message>div.request>span { float:right; }
$content>div.message>div.response { white-space:break-spaces; padding:0px; clear:both; } $content>div.message>div.response { white-space:break-spaces; padding:0px; clear:both; }
$content>div.request { padding:20px; } $content>div.request { padding-top:20px; }

View File

@ -1,6 +1,8 @@
Volcanos(chat.ONIMPORT, { Volcanos(chat.ONIMPORT, {
_init: function(can, msg) { can.ui = can.onappend.layout(can), can.ui.responseList = [] _init: function(can, msg) { can.ui = can.onappend.layout(can), can.ui.responseList = []
msg.Table(function(value) { can.onimport.item(can, {name: value.NAME}, function(event, item, show, target) { msg.Table(function(value) { can.onimport.item(can, {
name: value.NAME, nick: value.NAME+" ("+value.SIZE+")",
}, function(event, item, show, target) {
can.onimport.tabsCache(can, item, target, function() { can.onimport.content(can, target) }) can.onimport.tabsCache(can, item, target, function() { can.onimport.content(can, target) })
can.db.model = item.name, can.ui.message = target._message can.db.model = item.name, can.ui.message = target._message
can.onappend._status(can, msg), can.onimport.layout(can) can.onappend._status(can, msg), can.onimport.layout(can)
@ -8,7 +10,11 @@ Volcanos(chat.ONIMPORT, {
}, },
content: function(can, target) { content: function(can, target) {
var ui = can.page.Append(can, can.ui.content, [ var ui = can.page.Append(can, can.ui.content, [
{view: "message", list: [{text: "有什么问题尽管问吧!"}]}, {view: "message", list: [
{view: "response", list: [
{text: can.user.trans(can, "Please Ask Anything!", "有什么问题尽管问吧!")},
]},
]},
{view: "request", list: [ {view: "request", list: [
{type: html.TEXTAREA, onkeydown: function(event) { {type: html.TEXTAREA, onkeydown: function(event) {
if (event.key == code.ENTER) { if (event.key == code.ENTER) {
@ -24,7 +30,7 @@ Volcanos(chat.ONIMPORT, {
}, },
layout: function(can) { layout: function(can) {
can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function() { can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function() {
can.page.style(can, can.ui.message, html.MAX_HEIGHT, can.ConfHeight()-140) can.page.style(can, can.ui.message, html.MAX_HEIGHT, can.ConfHeight()-160)
}) })
} }
}) })

View File

@ -3,10 +3,20 @@ refer `
官网 https://ollama.com/ 官网 https://ollama.com/
源码 https://github.com/ollama/ollama 源码 https://github.com/ollama/ollama
模型 https://ollama.com/library/deepseek-r1 模型 https://ollama.com/library/deepseek-r1
应用 https://feizhuke.com/
` `
chapter "DeepSeek" chapter "DeepSeek"
refer ` refer `
官网 https://www.deepseek.com/ 官网 https://www.deepseek.com/
简介 https://blog.csdn.net/qq_40999403/article/details/139320266 简介 https://blog.csdn.net/qq_40999403/article/details/139320266
帖子 https://bbs.shylinux.com/forum.php?mod=viewthread&tid=6&page=1&extra=#pid23 帖子 https://bbs.shylinux.com/forum.php?mod=viewthread&tid=6&page=1&extra=#pid23
`
chapter "常用模型"
refer `
字节豆包 https://www.doubao.com/
腾讯元宝 https://yuanbao.tencent.com/
通义千问 https://tongyi.aliyun.com/
文心一言 https://yiyan.baidu.com/
月之暗面 https://kimi.moonshot.cn/
` `