上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 496 下一页
摘要: Run: ollama run gemma3 import { ollama } from "ollama-ai-provider"; import { generateObject } from "ai"; import { z } from "zod"; const model = ollama 阅读全文
posted @ 2025-07-05 18:37 Zhentiw 阅读(30) 评论(0) 推荐(0)
摘要: LLM,Large Language Model,大语言模型。 🤔思考: LLM 和 AI 这个词是完全等价的?或者说 AI 就是 LLM 么? LLM 仅仅是 AI 的一个分支。 任何能够使机器模仿人类行为的技术,都可以称之为人工智能技术。 人工智能下面有很多的分支,其中一个就是机器学习。 人类 阅读全文
posted @ 2025-07-05 18:20 Zhentiw 阅读(58) 评论(0) 推荐(0)
摘要: 准备工作 本地模型 模型分为两种: 1.专有模型:闭源模型 OpenAI GPT4 Cluade 优点:强大的商业支持 缺点:付费、数据的隐私 2.开源模型(学习阶段) 微软:Phi Meta:Llama deepseek 不需要联网 安装Ollama Ollama:模型平台,可以安装各种模型:Qw 阅读全文
posted @ 2025-07-05 18:18 Zhentiw 阅读(27) 评论(0) 推荐(0)
摘要: 通过前面的代码,其实我们已经完成了从模板AST到Javascript AST的转换 const ast = parse(template); transform(ast); 那接下来,我们只需要再根据Javascript AST生成具体的js代码就行了,比如再执行下面的函数: generate(as 阅读全文
posted @ 2025-06-27 13:41 Zhentiw 阅读(19) 评论(0) 推荐(0)
摘要: 我们现在已经有了模板AST,那么根据之前的顺序,我们现在需要把模板AST转化为JSAST。 要知道,模板AST是对模板的描述,那么JSAST就是对JS代码的描述。 也就是说,我们最终希望得到的代码是下面这样的: function render(){ return h('div',[ h('p','V 阅读全文
posted @ 2025-06-27 13:34 Zhentiw 阅读(16) 评论(0) 推荐(0)
摘要: 在转换AST节点的过程中,往往需要根据其子节点的情况来决定如何对当前节点进行转换,这就要求父节点的转换操作必须等待其所有子节点全部转换完毕之后再执行。 但是我们现在设计的转换流程并不支持这个能力,我们是从根节点开始,顺序往下执行的流程,如下图: 当一个节点被处理时,意味着它的子节点已经被处理完毕了, 阅读全文
posted @ 2025-06-26 13:51 Zhentiw 阅读(23) 评论(0) 推荐(0)
摘要: For example, we have following code doing AST transform from templateAST to Javascript AST function traverseNode(ast) { const currentNode = ast; // If 阅读全文
posted @ 2025-06-26 13:50 Zhentiw 阅读(21) 评论(0) 推荐(0)
摘要: const template = "<p>Vue</p>"; const State = { initial: 1, // init state tagOpen: 2, tagName: 3, text: 4, tagEnd: 5, tagEndName: 6, }; function isAlph 阅读全文
posted @ 2025-06-25 13:15 Zhentiw 阅读(14) 评论(0) 推荐(0)
摘要: https://risingstars.js.org/2024/en 2024 年最流行,最火热的项目排名 shadcnui:This is NOT a component library. It's a collection of re-usable components that you can 阅读全文
posted @ 2025-06-23 22:57 Zhentiw 阅读(202) 评论(0) 推荐(0)
摘要: 从上到下按照规则比较,直到能得到确切结果为止: 两端类型相同,比较值 两端存在 NaN,返回 false undefined 和 null 只有与自身比较,或者互相比时,才会返回 true 两端都是原始类型,转换成数字比较 一端是原始类型,一端是对象类型,把对象转换成原始类型后进入第 1 步 对象如 阅读全文
posted @ 2025-06-23 02:35 Zhentiw 阅读(12) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 496 下一页