| 1234567891011121314151617181920212223242526 |
- from pymilvus import FieldSchema, DataType
- # milvus 向量数据库
- what_fields = [
- # 主键 ID
- FieldSchema(
- name="id",
- dtype=DataType.INT64,
- is_primary=True,
- auto_id=True,
- description="自增id",
- ),
- # 文档 id 字段
- FieldSchema(
- name="doc_id", dtype=DataType.VARCHAR, max_length=64, description="文档id"
- ),
- FieldSchema(
- name="vector_text",
- dtype=DataType.FLOAT_VECTOR,
- dim=2560,
- description="",
- )
- ]
- __all__ = ["what_fields"]
|