파일을 업로드하면 처리 후 지식 베이스에 문서로 추가됩니다.
PDF 업로드
섹션 제목: “PDF 업로드”POST https://app.quickchat.ai/v1/api/knowledge_base/file_upload_api/pdf
PDF 파일을 업로드합니다. 내용을 추출하여 문서로 추가합니다.
curl -X POST https://app.quickchat.ai/v1/api/knowledge_base/file_upload_api/pdf \ -H 'Authorization: Bearer <API_TOKEN>' \ -F 'pdf_file=@document.pdf'import requests
with open("document.pdf", "rb") as f: response = requests.post( url="https://app.quickchat.ai/v1/api/knowledge_base/file_upload_api/pdf", headers={"Authorization": "Bearer <API_TOKEN>"}, files={"pdf_file": f}, )data = response.json()응답 200 OK
{ "status": "success", "message": "File processed successfully.", "article": { "id": 1234, "title": "document.pdf" }}| 필드 | 설명 |
|---|---|
status 문자열 | 처리 상태 |
message 문자열 | 사람이 읽을 수 있는 결과 메시지 |
article 객체 | 생성된 문서 |
파일 업로드
섹션 제목: “파일 업로드”POST https://app.quickchat.ai/v1/api/knowledge_base/file_upload_api/
지원되는 파일(PDF, DOCX)을 업로드합니다. 내용을 추출하여 문서로 추가합니다.
curl -X POST https://app.quickchat.ai/v1/api/knowledge_base/file_upload_api/ \ -H 'Authorization: Bearer <API_TOKEN>' \ -F 'file=@document.docx'import requests
with open("document.docx", "rb") as f: response = requests.post( url="https://app.quickchat.ai/v1/api/knowledge_base/file_upload_api/", headers={"Authorization": "Bearer <API_TOKEN>"}, files={"file": f}, )data = response.json()응답 200 OK: PDF 업로드와 같은 스키마입니다.