|
@@ -3,6 +3,7 @@ package com.lingyue.graph.entity;
|
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
import com.lingyue.common.domain.entity.SimpleModel;
|
|
import com.lingyue.common.domain.entity.SimpleModel;
|
|
|
|
|
+import com.lingyue.common.mybatis.PostgreSqlVectorTypeHandler;
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
import lombok.EqualsAndHashCode;
|
|
@@ -16,7 +17,7 @@ import lombok.EqualsAndHashCode;
|
|
|
*/
|
|
*/
|
|
|
@EqualsAndHashCode(callSuper = true)
|
|
@EqualsAndHashCode(callSuper = true)
|
|
|
@Data
|
|
@Data
|
|
|
-@TableName("vector_embeddings")
|
|
|
|
|
|
|
+@TableName(value = "vector_embeddings", autoResultMap = true)
|
|
|
@Schema(description = "向量嵌入实体")
|
|
@Schema(description = "向量嵌入实体")
|
|
|
public class VectorEmbedding extends SimpleModel {
|
|
public class VectorEmbedding extends SimpleModel {
|
|
|
|
|
|
|
@@ -25,7 +26,7 @@ public class VectorEmbedding extends SimpleModel {
|
|
|
private String chunkId;
|
|
private String chunkId;
|
|
|
|
|
|
|
|
@Schema(description = "向量嵌入(pgvector格式字符串)")
|
|
@Schema(description = "向量嵌入(pgvector格式字符串)")
|
|
|
- @TableField("embedding")
|
|
|
|
|
|
|
+ @TableField(value = "embedding", typeHandler = PostgreSqlVectorTypeHandler.class)
|
|
|
private String embedding;
|
|
private String embedding;
|
|
|
|
|
|
|
|
@Schema(description = "使用的嵌入模型名称")
|
|
@Schema(description = "使用的嵌入模型名称")
|