fit to docx
This commit is contained in:
parent
1156b44466
commit
e636bbb9c2
@ -1,12 +1,13 @@
|
|||||||
package model_es
|
package model_es
|
||||||
|
|
||||||
// INFO @brief 这个文件就是处理 ES 存储文档特征向量的集中处理
|
// INFO @brief 这个文件就是处理 ES 存储文档特征向量的集中处理;
|
||||||
|
|
||||||
func CreateDocESFactory() *Doc {
|
func CreateDocESFactory() *Doc {
|
||||||
return &Doc{}
|
return &Doc{}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Doc struct {
|
type Doc struct {
|
||||||
|
Id int64 `json:"id"` // 对应 MySQL 中存储的文档 ID。
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
Embedding []float64 `json:"embedding"`
|
Embedding []float64 `json:"embedding"`
|
||||||
}
|
}
|
||||||
@ -15,6 +16,7 @@ func (d *Doc) IndexName() string {
|
|||||||
return "catface_docs"
|
return "catface_docs"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Doc) InsertDocument() error {
|
// UPDATE 因为 chunck 还是 Python 来处理会比较方便,所以 Go 这边主要还是处理查询相关的操作。
|
||||||
return nil
|
// func (d *Doc) InsertDocument() error {
|
||||||
}
|
// return nil
|
||||||
|
// }
|
||||||
|
@ -67,16 +67,16 @@ FileUploadSetting:
|
|||||||
- "image/png" #png图片格式
|
- "image/png" #png图片格式
|
||||||
# - "image/x-icon" #ico图片
|
# - "image/x-icon" #ico图片
|
||||||
- "image/bmp" #bmp图片
|
- "image/bmp" #bmp图片
|
||||||
# - "application/zip" #xlsx、docx、zip
|
|
||||||
# - "application/x-gzip" #tar.gz
|
# - "application/x-gzip" #tar.gz
|
||||||
- "text/plain; charset=utf-8" #txt log json等文本文件
|
- "text/plain; charset=utf-8" #txt log json等文本文件
|
||||||
# - "video/mp4" #视频文件,例如:mp4
|
# - "video/mp4" #视频文件,例如:mp4
|
||||||
# - "audio/mpeg" #音频文件,例如: mp3
|
# - "audio/mpeg" #音频文件,例如: mp3
|
||||||
# TAG 文档
|
# TAG 文档
|
||||||
- "application/msword" # .doc
|
- "application/zip" #xlsx、docx、zip
|
||||||
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document" # .docx
|
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document" # .docx
|
||||||
- "application/pdf" # .pdf
|
- "application/pdf" # .pdf
|
||||||
- "application/octet-stream" # 适配 APIfox 的调用
|
- "application/octet-stream" # 适配 APIfox 的调用
|
||||||
|
|
||||||
AvatarWidth: 200
|
AvatarWidth: 200
|
||||||
DocsRootPath: "docs" # TODO 或许 upload 模块可以写一下自动区分大致的文件类型所在的位置。
|
DocsRootPath: "docs" # TODO 或许 upload 模块可以写一下自动区分大致的文件类型所在的位置。
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user