|
|
@@ -87,6 +87,8 @@ class MilvusStore:
|
|
|
FieldSchema(name="types", dtype=DataType.ARRAY,
|
|
|
element_type=DataType.VARCHAR, max_capacity=20, max_length=50),
|
|
|
FieldSchema(name="tags", dtype=DataType.JSON),
|
|
|
+ FieldSchema(name="tag_keys", dtype=DataType.ARRAY,
|
|
|
+ element_type=DataType.VARCHAR, max_capacity=50, max_length=100),
|
|
|
FieldSchema(name="scopes", dtype=DataType.ARRAY,
|
|
|
element_type=DataType.VARCHAR, max_capacity=20, max_length=100),
|
|
|
FieldSchema(name="owner", dtype=DataType.VARCHAR,
|
|
|
@@ -158,7 +160,7 @@ class MilvusStore:
|
|
|
limit=limit,
|
|
|
expr=filters,
|
|
|
output_fields=["id", "message_id", "task", "content", "types",
|
|
|
- "tags", "scopes", "owner", "resource_ids",
|
|
|
+ "tags", "tag_keys", "scopes", "owner", "resource_ids",
|
|
|
"source", "eval", "created_at", "updated_at"]
|
|
|
)
|
|
|
|
|
|
@@ -181,7 +183,7 @@ class MilvusStore:
|
|
|
results = self.collection.query(
|
|
|
expr=filters,
|
|
|
output_fields=["id", "message_id", "task", "content", "types",
|
|
|
- "tags", "scopes", "owner", "resource_ids",
|
|
|
+ "tags", "tag_keys", "scopes", "owner", "resource_ids",
|
|
|
"source", "eval", "created_at", "updated_at"],
|
|
|
limit=limit
|
|
|
)
|
|
|
@@ -200,7 +202,7 @@ class MilvusStore:
|
|
|
results = self.collection.query(
|
|
|
expr=f'id == "{knowledge_id}"',
|
|
|
output_fields=["id", "message_id", "task", "content", "types",
|
|
|
- "tags", "scopes", "owner", "resource_ids",
|
|
|
+ "tags", "tag_keys", "scopes", "owner", "resource_ids",
|
|
|
"source", "eval", "created_at", "updated_at"]
|
|
|
)
|
|
|
return results[0] if results else None
|