Bỏ qua

Lấy danh sách tài liệu trong Vector Store

GET /vector-stores/{vector-store-id}/documents

List all documents in a vector store.

Parameter In Type Required Description
vector-store-id path string yes The ID of the vector store.
x-api-key header string yes The API key for authentication.

Responses

  • 200 — A list of documents.

Ví dụ Yêu Cầu

curl -X GET   
  https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents   
  -H "x-api-key: YOUR_API_KEY"

Info

Thay thế YOUR_API_KEY bằng khóa API Vector Store thực tế của bạn và vs_abc123 bằng ID Vector Store của bạn.

const getVectorStoreDocuments = async (vectorStoreId) => {
  const response = await fetch(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents`, {
    method: 'GET',
    headers: {
      'x-api-key': 'YOUR_API_KEY'
    }
  });

  const data = await response.json();
  console.log(data);
};

getVectorStoreDocuments('vs_abc123');

Info

Thay thế YOUR_API_KEY bằng khóa API Vector Store thực tế của bạn và vs_abc123 bằng ID Vector Store của bạn.

import requests

def get_vector_store_documents(vector_store_id):
    headers = {
        "x-api-key": "YOUR_API_KEY"
    }

    response = requests.get(
        f"https://api.rememberizer.ai/api/v1/vector-stores/{vector_store_id}/documents",
        headers=headers
    )

    data = response.json()
    print(data)

get_vector_store_documents('vs_abc123')

Info

Thay thế YOUR_API_KEY bằng khóa API Vector Store thực tế của bạn và vs_abc123 bằng ID Vector Store của bạn.

Tham số Đường dẫn

Tham số Loại Mô tả
vector-store-id chuỗi Bắt buộc. ID của kho vector để liệt kê tài liệu từ đó.

Định dạng Phản hồi

[
  {
    "id": 1234,
    "name": "Hướng Dẫn Sản Phẩm.pdf",
    "type": "application/pdf",
    "vector_store": "vs_abc123",
    "size": 250000,
    "status": "đã lập chỉ mục",
    "processing_status": "hoàn thành",
    "indexed_on": "2023-06-15T10:30:00Z",
    "status_error_message": null,
    "created": "2023-06-15T10:15:00Z",
    "modified": "2023-06-15T10:30:00Z"
  },
  {
    "id": 1235,
    "name": "Thông Số Kỹ Thuật.docx",
    "type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
    "vector_store": "vs_abc123",
    "size": 125000,
    "status": "đã lập chỉ mục",
    "processing_status": "hoàn thành",
    "indexed_on": "2023-06-15T11:45:00Z",
    "status_error_message": null,
    "created": "2023-06-15T11:30:00Z",
    "modified": "2023-06-15T11:45:00Z"
  }
]

Xác thực

Điểm cuối này yêu cầu xác thực bằng cách sử dụng khóa API trong tiêu đề x-api-key.

Phản hồi Lỗi

Mã Trạng Thái Mô Tả
401 Không được phép - Khóa API không hợp lệ hoặc bị thiếu
404 Không tìm thấy - Không tìm thấy Vector Store
500 Lỗi Máy Chủ Nội Bộ

Điểm cuối này truy xuất danh sách tất cả các tài liệu được lưu trữ trong vector store đã chỉ định. Nó cung cấp siêu dữ liệu về mỗi tài liệu, bao gồm trạng thái xử lý tài liệu, kích thước và dấu thời gian đã lập chỉ mục. Thông tin này hữu ích để theo dõi nội dung của vector store của bạn và kiểm tra trạng thái xử lý tài liệu.