|
@ -25,10 +25,10 @@ dim = 384 |
|
|
connections.connect(host='127.0.0.1', port='19530') |
|
|
connections.connect(host='127.0.0.1', port='19530') |
|
|
|
|
|
|
|
|
fields = [ |
|
|
fields = [ |
|
|
FieldSchema(name='id', dtype=DataType.INT64, descrition='ids', is_primary=True, auto_id=True), |
|
|
|
|
|
FieldSchema(name='text_id', dtype=DataType.VARCHAR, descrition='text', max_length=500), |
|
|
|
|
|
FieldSchema(name='text', dtype=DataType.VARCHAR, descrition='text', max_length=1000), |
|
|
|
|
|
FieldSchema(name='embedding', dtype=DataType.FLOAT_VECTOR, descrition='embedding vectors', dim=dim) |
|
|
|
|
|
|
|
|
FieldSchema(name='id', dtype=DataType.INT64, description='ids', is_primary=True, auto_id=True), |
|
|
|
|
|
FieldSchema(name='text_id', dtype=DataType.VARCHAR, description='text', max_length=500), |
|
|
|
|
|
FieldSchema(name='text', dtype=DataType.VARCHAR, description='text', max_length=1000), |
|
|
|
|
|
FieldSchema(name='embedding', dtype=DataType.FLOAT_VECTOR, description='embedding vectors', dim=dim) |
|
|
] |
|
|
] |
|
|
schema = CollectionSchema(fields=fields, description='enhanced qa') |
|
|
schema = CollectionSchema(fields=fields, description='enhanced qa') |
|
|
collection = Collection(name=collection_name, schema=schema) |
|
|
collection = Collection(name=collection_name, schema=schema) |
|
|