中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

無(wú)錫知名網(wǎng)站制作求職seo

無(wú)錫知名網(wǎng)站制作,求職seo,動(dòng)漫做h免費(fèi)網(wǎng)站有哪些,網(wǎng)頁(yè)設(shè)計(jì)培訓(xùn)班學(xué)校排名LLMs 的記憶和信息檢索服務(wù)器 Motorhead 1. 為什么使用 Motorhead?2. 通過(guò) Docker 啟動(dòng) Motorhead3. Github 地址4. python 使用示例地址 1. 為什么使用 Motorhead? 使用 LLMs構(gòu)建聊天應(yīng)用程序時(shí),每次都必須構(gòu)建記憶處理。Motorhead是協(xié)助該…

LLMs 的記憶和信息檢索服務(wù)器 Motorhead

  • 1. 為什么使用 Motorhead?
  • 2. 通過(guò) Docker 啟動(dòng) Motorhead
  • 3. Github 地址
  • 4. python 使用示例地址

1. 為什么使用 Motorhead?

使用 LLMs構(gòu)建聊天應(yīng)用程序時(shí),每次都必須構(gòu)建記憶處理。Motorhead是協(xié)助該過(guò)程的服務(wù)器。

它提供了 4 個(gè)簡(jiǎn)單的 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 發(fā)送數(shù)組 messages 進(jìn)行存儲(chǔ)
curl --location 'localhost:8080/sessions/${SESSION_ID}/memory' \
--header 'Content-Type: application/json' \
--data '{"messages": [{ "role": "Human", "content": "ping" }, { "role": "AI", "content": "pong" }]
}'

存儲(chǔ)消息時(shí),可以使用現(xiàn)有會(huì)話或新 SESSION_ID 會(huì)話,如果會(huì)話以前不存在,則會(huì)自動(dòng)創(chuàng)建會(huì)話。

(可選) context 如果需要從其他數(shù)據(jù)存儲(chǔ)加載,則可以將其送入。

  • DELETE /sessions/:id/memory - 刪除會(huì)話的消息列表。

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.

為跟蹤對(duì)話設(shè)置了 LLM 最大值 window_size 。一旦達(dá)到最大值,Motorhead 將處理( window_size / 2 messages)并匯總它們。隨著消息的增長(zhǎng),后續(xù)摘要是增量的。

  • POST /sessions/:id/retrieval - 使用 VSS 按文本查詢進(jìn)行搜索
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. 通過(guò) Docker 啟動(dòng) 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. 暫時(shí)使用的可能性不大,所以先不做深入研究。

完結(jié)!

http://www.risenshineclean.com/news/50997.html

相關(guān)文章:

  • html5手機(jī)網(wǎng)站特效今日山東新聞?lì)^條
  • 麥包包的網(wǎng)站建設(shè)網(wǎng)絡(luò)運(yùn)營(yíng)推廣
  • 英文網(wǎng)站源碼北京疫情又嚴(yán)重了
  • 如何建設(shè)網(wǎng)站設(shè)計(jì)網(wǎng)站軟件推薦
  • 柳州建站免費(fèi)seo視頻教程
  • 自學(xué)做網(wǎng)站界面百度自動(dòng)駕駛技術(shù)
  • 中國(guó)建設(shè)銀行網(wǎng)站u盾修改密碼seo自學(xué)網(wǎng)app
  • 自動(dòng)優(yōu)化網(wǎng)站建設(shè)服裝市場(chǎng)調(diào)研報(bào)告范文
  • 可口可樂公司建設(shè)網(wǎng)站的目的是什么seo推廣優(yōu)化工具
  • 鄭州網(wǎng)站建設(shè)zzjisu網(wǎng)絡(luò)軟文營(yíng)銷案例3篇
  • 學(xué)校網(wǎng)站源碼php地推團(tuán)隊(duì)接單平臺(tái)
  • phpcms v9 網(wǎng)站搬家軟件培訓(xùn)機(jī)構(gòu)排名
  • 開源展示型網(wǎng)站沈陽(yáng)seo優(yōu)化新勢(shì)力
  • 網(wǎng)站建設(shè)推廣選stso88效果好91關(guān)鍵詞
  • 專業(yè)做網(wǎng)站的技術(shù)人員百度網(wǎng)站如何優(yōu)化排名
  • 怎么做網(wǎng)站開發(fā)中國(guó)最新消息
  • 深圳網(wǎng)站建設(shè)哪家公司好我贏網(wǎng)客服系統(tǒng)
  • window2003iis建好的網(wǎng)站營(yíng)銷型網(wǎng)站建設(shè)論文
  • WordPress主題沒有刪除站內(nèi)優(yōu)化seo
  • 做網(wǎng)站北京重慶seo技術(shù)教程博客
  • 長(zhǎng)沙優(yōu)化網(wǎng)站技術(shù)廠家seo網(wǎng)站推廣有哪些
  • 網(wǎng)站建設(shè)和錢外貿(mào)網(wǎng)站免費(fèi)推廣b2b
  • 網(wǎng)站如何能讓百度收錄網(wǎng)站數(shù)據(jù)
  • 做社區(qū)網(wǎng)站用什么程序?qū)幉╯eo排名外包
  • 網(wǎng)站建設(shè)資訊版塊如何做用戶運(yùn)營(yíng)百度網(wǎng)盤搜索神器
  • 低代碼開發(fā)平臺(tái) 開源文大俠seo博客
  • 網(wǎng)站制作網(wǎng)站建設(shè)項(xiàng)目規(guī)劃書軟文平臺(tái)有哪些
  • 網(wǎng)站的建站流程個(gè)人建站
  • 網(wǎng)站做淘寶客aso優(yōu)化服務(wù)站
  • 做母嬰產(chǎn)品的網(wǎng)站寧波網(wǎng)站建設(shè)網(wǎng)站排名優(yōu)化