当前位置: 首页 > news >正文

商务网站的功能和建设百度视频

商务网站的功能和建设,百度视频,腾讯云主机做网站,wordpress 附件外置文章目录 1. 什么是Ollama?2. 什么是Dify?3. 下载Ollama4. 安装Ollama5. Ollama Model library模型库6. 本地部署Llama 3.1模型7. 安装Docker Desktop8. 使用Docker-Compose部署Dify9. 注册Dify账号10. 集成本地部署的 Llama 3.1模型11. 集成智谱AI大模型…

文章目录

    • 1. 什么是Ollama?
    • 2. 什么是Dify?
    • 3. 下载Ollama
    • 4. 安装Ollama
    • 5. Ollama Model library模型库
    • 6. 本地部署Llama 3.1模型
    • 7. 安装Docker Desktop
    • 8. 使用Docker-Compose部署Dify
    • 9. 注册Dify账号
    • 10. 集成本地部署的 Llama 3.1模型
    • 11. 集成智谱AI大模型
    • 12. 添加Dify团队成员
    • 13. 导入DSL - 小红书文案生成脚本
    • 14. 所遇问题
    • 15. 参考链接

1. 什么是Ollama?

image-20241012175128004

Ollama 是一种可以学习和回答问题的 AI 模型,它能够进行自然语言交互,类似于人类对话。它具备一些独特的功能,如:

  1. 自主学习: Ollama 可以通过自身的学习过程改善其回答质量和知识范围。
  2. 无限回复: Ollama 能够不断地回答问题,无论你问多少个,直到你满意为止。
  3. 自然语言: Ollama 支持多种语言,包括英语、西班牙语等,你可以与它进行母语对话。

2. 什么是Dify?

Dify是一个开源的LLM应用程序开发平台。Dify直观的界面结合了人工智能工作流程、RAG管道、代理功能、模型管理、可观察性功能等,让您快速从原型进入生产。

3. 下载Ollama

下载链接:https://ollama.com

image-20241012170904054

image-20241012170949264

4. 安装Ollama

打开安装包,安装Ollama。

image-20240814172442161

5. Ollama Model library模型库

Ollama supports a list of models available on ollama.com/library

Here are some example models that can be downloaded:

ModelParametersSizeDownload
Llama 3.18B4.7GBollama run llama3.1
Llama 3.170B40GBollama run llama3.1:70b
Llama 3.1405B231GBollama run llama3.1:405b
Phi 3 Mini3.8B2.3GBollama run phi3
Phi 3 Medium14B7.9GBollama run phi3:medium
Gemma 22B1.6GBollama run gemma2:2b
Gemma 29B5.5GBollama run gemma2
Gemma 227B16GBollama run gemma2:27b
Mistral7B4.1GBollama run mistral
Moondream 21.4B829MBollama run moondream
Neural Chat7B4.1GBollama run neural-chat
Starling7B4.1GBollama run starling-lm
Code Llama7B3.8GBollama run codellama
Llama 2 Uncensored7B3.8GBollama run llama2-uncensored
LLaVA7B4.5GBollama run llava
Solar10.7B6.1GBollama run solar

Note:You should have at least 8 GB of RAM available to run the 7B models, 16 GB to run the 13B models, and 32 GB to run the 33B models.

6. 本地部署Llama 3.1模型

To run and chat with Llama 3.1:

ollama run llama3.1:8b

image-20240814171432310

Start ollama

C:\Users\xyb>ollama serve

image-20241012180127996

List models on your computer

C:\Users\xyb>ollama list
NAME            ID              SIZE    MODIFIED
llama3.1:8b     91ab477bec9d    4.7 GB  8 weeks ago

Show model information

C:\Users\xyb>ollama show llama3.1:8bModelarch                    llamaparameters              8.0Bquantization            Q4_0context length          131072embedding length        4096Parametersstop    "<|start_header_id|>"stop    "<|end_header_id|>"stop    "<|eot_id|>"LicenseLLAMA 3.1 COMMUNITY LICENSE AGREEMENTLlama 3.1 Version Release Date: July 23, 2024

ollama -h

C:\Users\xyb>ollama -h
Large language model runnerUsage:ollama [flags]ollama [command]Available Commands:serve       Start ollamacreate      Create a model from a Modelfileshow        Show information for a modelrun         Run a modelpull        Pull a model from a registrypush        Push a model to a registrylist        List modelsps          List running modelscp          Copy a modelrm          Remove a modelhelp        Help about any commandFlags:-h, --help      help for ollama-v, --version   Show version informationUse "ollama [command] --help" for more information about a command.

7. 安装Docker Desktop

在Windows 环境下,安装Docker Desktop。

image-20241012174905791

8. 使用Docker-Compose部署Dify

进入 Dify 源代码的 docker 目录,执行一键启动命令:

cd dify/dockercp .env.example .envdocker compose up -d

输入过程如下:

C:\dify\docker>docker-compose up  -d
[+] Running 11/11✔ Network docker_default             Created                     0.1s✔ Network docker_ssrf_proxy_network  Created                     0.0s✔ Container docker-web-1             Started                     1.4s✔ Container docker-weaviate-1        Started                     1.2s✔ Container docker-ssrf_proxy-1      Started                     1.9s✔ Container docker-sandbox-1         Started                     1.9s✔ Container docker-redis-1           Started                     1.4s✔ Container docker-db-1              Started                     1.7s✔ Container docker-worker-1          Started                     2.6s✔ Container docker-api-1             Started                     2.8s✔ Container docker-nginx-1           Started                     3.7s

启动完成后,你的 docker 里就会看到这个:

在这里插入图片描述
image-20241012120722598

也可以在Docker-Compose中查看到已启动的容器。

image-20240818150320373

9. 注册Dify账号

打开浏览器,输入http://127.0.0.1

设置管理员账户。输入邮箱、用户名、密码。

image-20241012163648495

填写完成后,点击设置。

image-20240815093239830

跳转至登录揭秘那,输入邮箱和密码完成登录。

image-20240815093327170

至此,我们利用Docker Compose 在Windows本地环境中,完成Dify的搭建部署工作。

image-20240815093356383

10. 集成本地部署的 Llama 3.1模型

  • 点击设置

image-20240815093653323

  • 选择模型提供商Ollama

image-20240815093813927

填写如下参数信息。

!!!注意!!!:模型名称和基础URL要填写正确,否则会添加失败报错。

image-20240818145633535

  • 添加成功。

image-20240818144324916

  • 我们也可以输入以下地址,验证所添加的ollama模型是否已启动。

image-20241012172323267

11. 集成智谱AI大模型

  • 获取智谱 AI API Key

获取链接:智谱AI开放平台

image-20240818145757305

2e0556xxxxxxxxxxxxxxxxxxxxxxxxxxxE6of

image-20241012164255172

image-20241012164336131

image-20241012164440679

12. 添加Dify团队成员

image-20241012164545813

image-20241012164614694

http://127.0.0.1/activate?email=xxxxxxxx@outlook.com&token=34aa37d7-7d9a-4b64-9ed6-d0372380ad7f

image-20241012165623216

image-20241012165659255

13. 导入DSL - 小红书文案生成脚本

  • 导入DSL

image-20241012170623745

  • 小红书文案生成脚本工作流如下:

image-20240815093458359

  • 输入关键字

image-20241012174128200

  • 输出结果

image-20241012174037311

  • 生成内容如下:
标题:
1. 🌟【日常美学】🌼 这样的小确幸,让你幸福感爆棚!🍵📖✨
2. 💖【生活小秘诀】🌸 发现日常中的小美好,幸福感瞬间up!📸
3. 🌿【限量版生活】🌼 每天都是独一无二的美好!🍵📖✨
4. 📖【生活美学】🌸 一本好书,一杯香茗,幸福感满满!💖
5. 🌼【小确幸分享】🍵 这样的小日常,让你心情大好!📸
6. ✨【日常小美好】🌸 发现生活中的小确幸,幸福感飙升!📖
7. 🍵【生活小确幸】🌼 一杯香茗,一束鲜花,幸福感满满!💖
8. 📸【记录美好】🌸 每天都是限量版,用心发现小确幸!✨
9. 💖【生活美学】🌼 这样的小日常,幸福感瞬间up!🍵📖
10. 🌿【小确幸日常】🌸 一本好书,一束鲜花,幸福感爆棚!✨
11. 🌼【日常小秘诀】🍵 发现生活中的小美好,幸福感大增!💖
12. 📖【限量版日常】🌸 每天都是独一无二的美好!📸✨
13. ✨【生活小确幸】🌼 一杯香茗,一本好书,幸福感满满!🍵
14. 🍵【日常美学】🌸 这样的小确幸,让你心情大好!💖
15. 📸【小确幸分享】🌼 发现日常中的小美好,幸福感飙升!📖
16. 💖【记录美好】🌸 每天都是限量版,用心发现小确幸!🌿✨
17. 🌿【生活小美好】🌼 一本好书,一束鲜花,幸福感满满!🍵
18. 🌼【日常小确幸】🍵 这样的小日常,幸福感瞬间up!📸💖
19. 📖【小确幸日常】🌸 发现生活中的小美好,幸福感大增!✨
20. ✨【限量版生活】🌼 每天都是独一无二的美好!🍵📖💖
文案:
🌿🌸【生活小确幸】🍵 每天都是限量版,用心发现生活中的小美好!📖 一杯香茗,🌼 一本好书,简单日常也能闪闪发光✨。分享我的生活小秘诀,幸福感瞬间up up!📸 记录每一刻,生活美学,从心开始💖。你也有这样的小确幸吗?快来评论区分享吧!🌟🌿#生活美学 #小确幸 #日常分享 #幸福感 #记录美好 #限量版生活

14. 所遇问题

C:\Users\xyb>ollama serve
Error: listen tcp :11434: bind: An attempt was made to access a socket in a way forbidden by its access permissions.C:\Users\xyb>ollama run llama3.1:8b
Error: could not connect to ollama app, is it running?

需要关闭本地环境中的代理。

An error occurred during credentials validation: HTTPConnectionPool(host='127.0.0.1', port=11434): Max retries exceeded with url: /api/chat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7eff701373d0>: Failed to establish a new connection: [Errno 111] Connection refused'))An error occurred during credentials validation: HTTPConnectionPool(host='localhost', port=11434): Max retries exceeded with url: /api/chat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7eff70136260>: Failed to establish a new connection: [Errno 111] Connection refused'))

填写Ollama模型名称和基础URL信息有误导致的。

image-20240815115529322

image-20240815115533417

An error occurred during credentials validation: API request failed with status code 404: {"error":"model \"Llama 3.1\" not found, try pulling it first"}

image-20240818132217486

15. 参考链接

1️⃣https://mp.weixin.qq.com/s/jAX7uI_gjV4e7nzgb_rkrQ

2️⃣https://github.com/langgenius/dify

3️⃣Windows preview · Ollama Blog

4️⃣llama3.1:8b

5️⃣Download Ollama on Windows

6️⃣ollama/ollama: Get up and running with Llama 3.1, Mistral, Gemma 2, and other large language models.

Dify 教程二:使用本地大模型 | Coder 小站 (ihsxu.com)

github.com/langgenius/dify)

3️⃣Windows preview · Ollama Blog

4️⃣llama3.1:8b

5️⃣Download Ollama on Windows

6️⃣ollama/ollama: Get up and running with Llama 3.1, Mistral, Gemma 2, and other large language models.

http://www.hkea.cn/news/405607/

相关文章:

  • 做网站套餐网站seo
  • 网站上的代码网页怎么做的下载百度软件
  • 网站功能模块建设搜狗推广
  • 网站做推广有用吗网站页面设计
  • 做简报的网站广州搜发网络科技有限公司
  • 南乐县住房和城乡建设局网站制作网站的步骤是什么
  • 金华做网站最专业的公司搜易网提供的技术服务
  • wordpress适合门户网站吗怎么营销自己的产品
  • 常用的网站类型有哪些seo优化专员编辑
  • 网站专题框架怎么做海阳seo排名
  • 手机网站代码下载黄页网站推广服务
  • 做网站前端多少钱在线bt种子
  • wordpress+模版+推荐专业网站seo推广
  • 浦项建设公司员工网站2023免费推广入口
  • 如何查询某个网站的设计公司最新推广注册app拿佣金
  • 八宝山做网站公司打广告
  • wordpress vip查看插件南宁seo费用服务
  • 建站之星模板怎么设置手机如何做网站
  • 上海公司网站制作价格西安百度关键词排名服务
  • 长沙网页制作开发公司aso优化方案
  • 深圳罗湖网站制作成人电脑基础培训班
  • 无锡网站制作咨询深圳网站设计十年乐云seo
  • 大连城市建设网站seo优化顾问服务阿亮
  • 福州 网站建设沈阳seo关键词排名优化软件
  • 做网站还要买服务器吗镇江seo
  • 专门做特价的网站优化排名案例
  • 网站建设的一些问题友链交易交易平台
  • 创业初期要建立公司的网站吗seo排名优化代理
  • 做网站全屏尺寸是多少钱站长工具查询系统
  • 做企业平台的网站有哪些手机网站制作教程