跳转到主要内容

多模态写入(Multimodal Ingest)

Memorose 可以写入和检索纯文本以外的多种内容类型。

支持的写入内容类型

当前写入接口支持以下类型:
  • text
  • image
  • audio
  • video
  • json
请求体使用 contentcontent_type 字段。

示例:JSON 事件

curl -s -X POST "http://127.0.0.1:3000/v1/users/user_123/streams/$STREAM_ID/events" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "org_id": "default",
    "content_type": "json",
    "content": "{\"source\":\"calendar\",\"title\":\"Team sync\",\"time\":\"2026-03-25T09:00:00Z\"}"
  }'

多模态检索(Multimodal Retrieval)

检索时可以将文本查询与 base64 编码的媒体一起进行向量嵌入:
  • image
  • audio
  • video
curl -s -X POST "http://127.0.0.1:3000/v1/users/user_123/streams/$STREAM_ID/retrieve" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Find related UI references for this screenshot",
    "image": "<base64-image>",
    "limit": 5
  }'
查询文本仍然是必需的。媒体内容作为额外的检索信号。