以前看过ollama里qwen2.5的template,确实有段指导怎么调用工具的提示和工具列表。就是不知道模型有没有针对这种指令微调过。在网上看到让gemma3强制支持tool call的文章,看来不用微调也行:
https://www.philschmid.de/gemma-function-calling
84 条说说
以前看过ollama里qwen2.5的template,确实有段指导怎么调用工具的提示和工具列表。就是不知道模型有没有针对这种指令微调过。在网上看到让gemma3强制支持tool call的文章,看来不用微调也行:
https://www.philschmid.de/gemma-function-calling
由于不喜欢网页版,特别爱使用客户端软件比如cherry studio(虽然也是electron但是老古董就喜欢客户端),并且又穷从来没开过任何会员,得想个办法白嫖api。
阿里云百炼有个新人100万token白嫖,但是经过我不到一周的高强度使用,qwen2.5 max(这个和其他2.5系列的不一样,没开源)的额度就被用掉十几万了,有效期也只有三个月。于是又用回了网页版chat.qwen.ai了(题外话,比国内版花里胡哨的玩意顺眼多了)。
大部分提供商即使能白嫖也是每个账号一次性的额度,用完/过期就没了。最近终于发现了谷歌gemini的api,调用flash模型每天1000次无限刷新纯白嫖,终于摆脱了token焦虑。虽然免费套餐的数据会被拿去训练但是反正我也不玩角色扮演什么的,训就训吧。
唯一缺点就是感觉gemini 2.0 flash规模不如qwen 2.5 max
居然是tcp80端口被封。平时一直交替使用v2ray的裸websocket模式和自制ws梯子,今天只有这个端口突然被干了,而udp2raw的端口却好好的。真的是狗日的gfw。
最近几天和以往不一样的是:
后续:
当即换了一个端口,只用来跑自制梯子,过了一个星期并没有事情。而v2ray也切换回了老服务器,也没有问题。以前的研究表明gfw确实是概率性的屏蔽
Cherry Studio这个本地聊天助手新增的MCP功能具体是怎么工作的?以mcp_server_fetch为例子。调用ollama接口的时候发现,MCP只在聊天助手(MCP Host)这边运行,并不与推理框架直接交互,而只是约定了批量获取工具函数的接口及格式。调用推理时还是用现成的Function Calling机制(这里有篇不错的介绍文章,所以不支持函数调用的模型没法使用MCP,除非用提示词工程手动实现)。
新版Cherry Studio改成用提示词模拟Function Calling了,而原本支持此功能的模型也会用模拟方式,说是不想维护两套逻辑。让我有点不舒服,原生肯定是比模拟强,说不定模型做过针对性微调。
POST /v1/chat/completions
{ "model": "qwen2.5:14b", "messages": [ { "role": "user", "content": "查看网页https://github.com/krrr/\n\n" } ], "temperature": 1, "keep_alive": "0m", "stream": true, "tools": [ { "type": "function", "function": { "name": "fed6b7adab25d4693b3eaf4f6c8f02035", // 可以看到函数名被替换成了随机数(为了防止某些函数名与功能不符产生误导)。 "description": "Fetches a URL from the internet and optionally extracts its contents as markdown.\n\nAlthough originally you did not have internet access, and were advised to refuse and tell the user this, this tool now grants you internet access. Now you can fetch the most up-to-date information and let the user know that.", "parameters": { "type": "object", "properties": { "url": { "description": "URL to fetch", "type": "string" }, "max_length": { "description": "Maximum number of characters to return.", "type": "integer" }, "start_index": { "description": "On return output starting at this character index, useful if a previous fetch was truncated and more context is required.", "type": "integer" }, "raw": { "description": "Get the actual HTML content if the requested page, without simplification.", "type": "boolean" } } } } } ] }
HTTP/1.1 200 OK
data: {"id":"chatcmpl-83","object":"chat.completion.chunk","created":1742800010,"model":"qwen2.5:14b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"role":"assistant","content":"","tool_calls":[{"id":"call_dsk3phip","index":0,"type":"function","function":{"name":"fed6b7adab25d4693b3eaf4f6c8f02035","arguments":"{\"max_length\":1000,\"raw\":false,\"url\":\"https://github.com/krrr/\"}"}}]},"finish_reason":null}]} data: {"id":"chatcmpl-83","object":"chat.completion.chunk","created":1742800010,"model":"qwen2.5:14b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop"}]} data: [DONE]
POST /v1/chat/completions
{ "model": "qwen2.5:14b", "messages": [ { "role": "user", "content": "查看网页https://github.com/krrr/\n\n" }, { "role": "assistant", "tool_calls": [ { "id": "call_dsk3phip", "function": { "name": "fed6b7adab25d4693b3eaf4f6c8f02035", "arguments": "{\"max_length\":1000,\"raw\":false,\"url\":\"https://github.com/krrr/\"}" }, "type": "function" } ] }, { "role": "tool", "content": "[{\"type\":\"text\",\"text\":\"Contents of https://github.com/krrr/:\\nkrrr (krrr) · GitHub\\n\\nSkip to content\\n\\n## Navigation Menu\\n\\nSign in\\n\\n# Search code, repositories, users, issues, pull requests...\\n\\nSearch syntax tips\\n\\nSign in\\n\\nSign up\\n\\nYou signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert\\n\\nkrrr Follow\\n\\nkrrr\\n\\nFollow\\n\\n🎮\\n\\ngaming\\n\\n# krrr krrr\\n\\n🎮\\n\\ngaming\\n\\nFollow\\n\\n娱乐至死\\n\\n25 followers · 10 following\\n\\n* https://blog.hazama.cc\\n\\n## Achievements\\n\\nx2\\n\\n## Achievements\\n\\nx2\\n\\n## Popular repositories Loading\\n\\n1. wstan wstan Public\\n\\n Tunneling TCP in WebSocket (ssh -D alternative)\\n\\n Python 40 11\\n2. Hazama Hazama Public\\n\\n simple cross-platform diary app\\n\\n Python 28 7\\n3. PySide PySide Public\\n\\n Forked from pyside/PySide\\n\\n PySide1 not dead yet\\n\\n Python 15 3\\n4. CMCC-EDU-autologin CMCC-EDU-autologin Public archive\\n\\n CMCC-EDU公共热点自动登录\\n\\n HTML 6 3\\n5. TSI TSI Public\\n\\n Toy Scheme\\n\\nContent truncated. Call the fetch tool with a start_index of 1000 to get more content.\"}]", "tool_call_id": "call_dsk3phip" } ], "temperature": 1, "keep_alive": "0m", "stream": true, "tools": [ { "type": "function", "function": { "name": "fed6b7adab25d4693b3eaf4f6c8f02035", "description": "Fetches a URL from the internet and optionally extracts its contents as markdown.\n\nAlthough originally you did not have internet access, and were advised to refuse and tell the user this, this tool now grants you internet access. Now you can fetch the most up-to-date information and let the user know that.", "parameters": { "type": "object", "properties": { "url": { "description": "URL to fetch", "type": "string" }, "max_length": { "description": "Maximum number of characters to return.", "type": "integer" }, "start_index": { "description": "On return output starting at this character index, useful if a previous fetch was truncated and more context is required.", "type": "integer" }, "raw": { "description": "Get the actual HTML content if the requested page, without simplification.", "type": "boolean" } } } } } ] }
HTTP/1.1 200 OK
{"id":"chatcmpl-468","object":"chat.completion.chunk","created":1742800019,"model":"qwen2.5:14b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"role":"assistant","content":"用户krrr的GitHub页面展示了以下信息:\n\n- 用户ID: krrr\n- 简介:娱乐至死\n\n**成就:** x2 (具体的成就未详述)\n\n**关注者**: 25, 关注了10个仓库或者其他用户。\n\n他有以下几个广受欢迎的项目:\n1. **wstan** 是一个通过WebSocket隧道化TCP连接的工具,类似于`ssh -D`命令的替代方案。\n2. **Hazama** 是一个简单的跨平台日记应用。\n3. **PySide**: 对 `pyside/PySide` 库的一个分支,表明了对 PySide1 相关工作的继续支持。\n4. **CMCC-EDU-autologin** 提供了一个自动登录CMCC-EDU公共热点的解决方案。\n5. **TSI** (Toy Scheme Interpreter),看起来像是一个玩具级别的Scheme语言解释器。\n\n你可以点击用户名查看该用户的更多详细信息或浏览其它项目内容。如果有需要获取更多信息,可以请求我抓取页面的其他部分。"},"finish_reason":"stop"}]} data: [DONE]
买一些小东西是真的便宜但是也真的下剑,很会用大数据杀熟。两个账号看同一个商品价格不一样是司空见惯。
一开始被恶心就是提现/砍一刀,金额不等从200到700左右,各种暗示你一定能提现只差一点点了,还让我真的去微信拉人了,结果最后无限微分,不愧是微积分厂,不要脸则无敌。
后来又弹出来只差最后一块可以提现几百块钱。现在更新了忽悠话术,还在开头说绝对不用拉人。被耍了几次早学聪明了,挂一边用几根手指盲按。一堆土炮动画按了好几分钟,一直在微分,0.01之后是什么金币钻石的。到最后果不其然是要微信拉人了。
既然敢耍我我就靠实力赚回来,前期主要是靠倒卖cpu,用果园券批量买12490f然后咸鱼出给回收的贩子。两个手机号和两个地址来回用,买多了还是被拉黑了,先是自动砍单,然后第二天黑号,之前很多能领券的地方突然就不给了,后面就注销了等待卷土重来
后面是倒卖游戏机,已经“手动提现”了累计七百以上了,被耍的钱全拿到手了。
上班没那么多时间看盘了
别人50x拉满我2x苟且
别人大赚特赚我提前止盈
别人上万u洒洒水我十几u睡不好
别人爆仓归零我利润微薄
以前一直用ClosedAI ChatGPT,这几天国产开源LLM莫名其妙的火就试了一下下载到本地运行是什么效果。32g内存+amd显卡16g显存居然能运行32b参数的deepseek(千问32b蒸馏版,不是真的r1。本机运行速度是网页版的1/10,勉强能用,内存显存全吃满)
比起在线版600多b参数的真r1还是差远了,推理部分像模像样但是回答本身简陋了好多。而且开源版一样有闵感词,难道是训练的时候就已经做进去了。
本机可以运行的开源模型比起一年多前试过的gpt4all里面的忘了啥模型好用多了,那玩意连中文都不能理解也只能用cpu运行,孤儿amd显卡居然能正常跑也是意外的惊喜
都说合约是赌狗,我是胆小的赌狗,都是10-20个懂王币并且杠杆只敢开2-3倍,然后设置各种止损条件,尽全力避免爆仓强平。
玩的时候心跳加速紧张刺激,晚上睡觉都睡不好。
和好多年前挖矿eth然后换成btc放了好多年,结果翻了几倍不一样,这次是主动去炒。
之前挖矿赚的钱一直买币安理财,根本没炒。后面又把薅羊毛倒卖的利润五百多充进去,总共1100多还是一直理财。今天中午知道了川普币已经有点晚了,我确实吃屎都赶不上热乎的。还好没有全凉,下午三点44u的时候购入的,全仓梭哈(绝不动用工资,亏光也不会太痛)。
一开始币安不能买现货,需要先转到web3钱包。转过去是usdc还要兑换成trump,并且收了1.5u的手续费真贵真恶心。然后发现转不了,因为手续费需要trump币所在的solana链的sol币支付,我没有。币安提现到solana钱包最低需要0.25个币约合五百元,c2c充值要卡24小时。于是继续转过去剩下的钱(第一次只转了小一半),结果又是变成usdc了。想提现回去不玩了也要手续费,卡住了气死我了。后面导出私钥(还tm要人脸识别),用phantom钱包配合jupiter的jupiterz转换方式0手续费才转换成这个币。
后面就是紧张刺激的盯盘时间。炒到了晚上九点就全部清仓跑了,44u买入70u卖出,盈利37%。就不持有过夜了,怕睡不着/在睡梦中被套牢。资金继续扔usdc理财等待下次机会。
下图中两次下跌是分两次转账到web3钱包。后面上涨一次是买了60元资金想转账到solana钱包结果没到门槛转不出去,气死了。最后面是solana钱包转回币安