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

建设网站要多久到账初步ps网页设计素材

建设网站要多久到账,初步ps网页设计素材,今天的新闻联播直播,西安微信公众号制作LLMs 的记忆和信息检索服务器 Motorhead 1. 为什么使用 Motorhead?2. 通过 Docker 启动 Motorhead3. Github 地址4. python 使用示例地址 1. 为什么使用 Motorhead? 使用 LLMs构建聊天应用程序时,每次都必须构建记忆处理。Motorhead是协助该…

LLMs 的记忆和信息检索服务器 Motorhead

  • 1. 为什么使用 Motorhead?
  • 2. 通过 Docker 启动 Motorhead
  • 3. Github 地址
  • 4. python 使用示例地址

1. 为什么使用 Motorhead?

使用 LLMs构建聊天应用程序时,每次都必须构建记忆处理。Motorhead是协助该过程的服务器。

它提供了 4 个简单的 API:

  • GET /sessions/:id/memory 返回最多 MAX_WINDOW_SIZE 的 messages
{"messages": [{"role": "AI","content": "Electronic music and salsa are two very different genres of music, and the way people dance to them is also quite different."},{"role": "Human","content": "how does it compare to salsa?"},{"role": "AI","content": "Electronic music is a broad genre that encompasses many different styles, so there is no one \"right\" way to dance to it."},{"role": "Human","content": "how do you dance electronic music?"},{"role": "AI","content": "Colombia has a vibrant electronic music scene, and there are many talented DJs and producers who have gained international recognition."},{"role": "Human","content": "What are some famous djs from Colombia?"},{"role": "AI","content": "Baum opened its doors in 2014 and has quickly become one of the most popular clubs for electronic music in Bogotá."}],"context": "The conversation covers topics such as clubs for electronic music in Bogotá, popular tourist attractions in the city, and general information about Colombia. The AI provides information about popular electronic music clubs such as Baum and Video Club, as well as electronic music festivals that take place in Bogotá. The AI also recommends tourist attractions such as La Candelaria, Monserrate and the Salt Cathedral of Zipaquirá, and provides general information about Colombia's diverse culture, landscape and wildlife.","tokens": 744 // tokens used for incremental summarization
}
  • POST /sessions/:id/memory - 向 Motorhead 发送数组 messages 进行存储
curl --location 'localhost:8080/sessions/${SESSION_ID}/memory' \
--header 'Content-Type: application/json' \
--data '{"messages": [{ "role": "Human", "content": "ping" }, { "role": "AI", "content": "pong" }]
}'

存储消息时,可以使用现有会话或新 SESSION_ID 会话,如果会话以前不存在,则会自动创建会话。

(可选) context 如果需要从其他数据存储加载,则可以将其送入。

  • DELETE /sessions/:id/memory - 删除会话的消息列表。

A max window_size is set for the LLM to keep track of the conversation. Once that max is hit, Motorhead will process (window_size / 2 messages) and summarize them. Subsequent summaries, as the messages grow, are incremental.

为跟踪对话设置了 LLM 最大值 window_size 。一旦达到最大值,Motorhead 将处理( window_size / 2 messages)并汇总它们。随着消息的增长,后续摘要是增量的。

  • POST /sessions/:id/retrieval - 使用 VSS 按文本查询进行搜索
curl --location 'localhost:8080/sessions/${SESSION_ID}/retrieval' \
--header 'Content-Type: application/json' \
--data '{"text": "Generals gathered in their masses, just like witches in black masses"
}'

2. 通过 Docker 启动 Motorhead

docker run --rm --name some-redis -p 6379:6379 -d redis
docker run --rm --name motorhead -p 8080:8080 -e PORT=8080 -e REDIS_URL='redis://some-redis:6379' -d ghcr.io/getmetal/motorhead:latest

3. Github 地址

https://github.com/getmetal/motorhead

4. python 使用示例地址

https://github.com/getmetal/motorhead/tree/main/examples/chat-py

p.s. 暂时使用的可能性不大,所以先不做深入研究。

完结!

http://www.yayakq.cn/news/731019/

相关文章:

  • 网站后台能进前台空白上海工商网上企业查名
  • 高职专业建设管理网站西数 网站建设
  • 网站设计思路怎么写英语教学网站建设意见
  • onethink做移动网站芜湖代理公司注册
  • 电子商务网站的建设包含哪些流程图开发工程师是程序员吗
  • 福建省建设局实名制网站网站规划建设与管理维护的论文
  • 网站建设mfdos定制网站和模板网站
  • 网站建设与推广是什么意思媒体软文发稿
  • dedecms电影网站模板江西省住房城乡建设厅网站
  • 我有虚拟服务器怎么快速做网站汉口网站制作设计
  • 江苏工程建设交易信息网站营业推广名词解释
  • 巩义便宜网站建设价格设计商贸公司logo
  • 网站备案中福州十大设计公司
  • 佛山便宜网站建设wordpress 视频模版
  • 公益网站 html 模板做网站的流程百科
  • 大连网站建设#选领超科技提示网站有风险
  • 网站推广与营销知识手机端怎么看世界杯
  • 芮城网站建设广州企业网站建设推荐
  • 免费推广网站哪家好版式设计
  • 一流的嘉兴网站建设长春网站建设找源晟
  • 成都网站建设全美工作证的照片几寸
  • 招远建网站首选公司网站建设方向论文提纲
  • 开淘宝的店铺网站怎么做网站 手机案例
  • 淘宝联盟网站备案网站被k申诉
  • 做网站自己申请域名还是对方wordpress 计划任务
  • 网站开发流程说明手机app开发网站
  • 苏州免费网站制作为什么网站不见了
  • 中国建信网官方网站红色基调网站
  • 网站开发管理招聘wordpress 页面代码
  • 佛山网站建设公司大全wordpress文章底部删除