Skip to content

GetTableResponse

Example Usage

typescript
import { GetTableResponse } from "@meetkai/mka1/models/components";

let value: GetTableResponse = {
  tableName: "support_kb",
  schema: {
    fields: [
      {
        name: "id",
        nullable: false,
        type: "string",
      },
      {
        name: "content",
        nullable: false,
        type: "string",
        index: "FTS",
      },
      {
        name: "category",
        nullable: false,
        type: "string",
      },
      {
        name: "rating",
        nullable: true,
        type: "float",
      },
      {
        name: "embedding",
        nullable: false,
        type: "vector",
        dimensions: 3,
      },
    ],
  },
  indices: [
    {
      field: "content",
      indexType: "FTS",
      config: {
        "type": "FTS",
      },
    },
    {
      field: "embedding",
      indexType: "IVF_FLAT",
      config: {
        "distance_type": "cosine",
        "num_partitions": 128,
        "type": "IVF_FLAT",
      },
    },
  ],
  stats: {
    totalBytes: 24251,
    numRows: 1250,
    numIndices: 442453,
    fragmentStats: {
      numFragments: 135908,
      numSmallFragments: 150764,
      lengths: {
        min: 872976,
        max: 575142,
        mean: 894783,
        p25: 198219,
        p50: 373135,
        p75: 581949,
        p99: 96223,
      },
    },
  },
};

Fields

FieldTypeRequiredDescription
tableNamestring✔️N/A
schemacomponents.TableSchemaOutput✔️N/A
indicescomponents.IndexInfo[]✔️N/A
statscomponents.TableStatistics✔️N/A