LogoLogo
註冊/登入
  • 使用者手冊
  • 技術人員手冊
  • API 文件
  • AI 助理市集
  • 歡迎來到 MaiAgent
  • 生成式 AI 快速入門
    • 大型語言模型(LLM)
    • RAG 知識庫檢索系統
    • Embedding 模型
    • Reranker 模型
    • Parser 解析工具
    • 圖像辨識支援
    • 使用環境規劃(SaaS/私有雲/地端)
    • GPU 算力硬體規劃
  • 進階生成式 AI 技術
    • Text to SQL
    • Function Calling
    • Canvas
    • AI 安全防護機制
  • AI 助理模組
    • 角色指令
    • 知識庫
    • FAQ 常見問題管理
    • 回覆評估與監測結果
    • AWS Guardrails
  • API 串接
    • 快速上手
    • AI 助理列表
    • 對話與訊息回覆(串流/同步)
    • 建立對話與訊息
    • Webhook
    • 檔案上傳
    • 檔案上傳知識庫
    • 附件上傳
  • Line LIFF 串接
    • 什麼是 LINE LIFF
    • 如何串接
  • Remote MCP 串接
    • Remote MCP 服務概述
    • Composio 串接
  • 其他
    • Google Sheet 串接
    • n8n 串接
    • MaiAgent vs. Dify 比較
Powered by GitBook
On this page

Was this helpful?

  1. API 串接

檔案上傳知識庫

檔案文件串接

Previous檔案上傳Next附件上傳

Last updated 20 days ago

Was this helpful?

建議請先閱讀上一章的「檔案上傳」

Endpoint

POST https://api.maiagent.ai/api/v1/chatbots/{chatbot_id}/files/

說明

上傳完成後,將檔案相關資訊提交至伺服器進行記錄。

請求參數

參數名稱
型別
必填
說明

files

array

是

包含檔案資訊的陣列

files[].file

string

是

檔案在雲端儲存的路徑

files[].filename

string

是

使用者希望保存的檔案名稱

範例請求

curl --location 'https://api.maiagent.ai/api/v1/chatbots/484a07fe-b401-4a32-9077-ddaae0c5e862/files/' \
--header 'Authorization: Api-Key ' \
--header 'Content-Type: application/json' \
--data '{
    "files": [
        {
            "file": "media/chatbots/chatbot-file/d83c88aa-3874-49a6-b01e-1948ae48b747.xlsx",
            "filename": "Products_example.xlsx"
        }
    ]
}'

回應範例

[
  {
    "id": "19ed09f0-a791-42a5-841f-c44faad2ef8b",
    "filename": "Products_example.xlsx",
    "file": "https://whizchat-media-prod-django.playma.app/media/chatbots/chatbot-file/d83c88aa-3874-49a6-b01e-1948ae48b747.xlsx",
    "fileType": "csv",
    "size": 582,
    "status": "initial",
    "document": null,
    "createdAt": "1728375369000"
  }
]
檔案上傳