fit to docx

This commit is contained in:
Havoc412 2024-11-15 22:15:47 +08:00
parent 1156b44466
commit e636bbb9c2
2 changed files with 8 additions and 6 deletions

View File

@ -1,12 +1,13 @@
package model_es
// INFO @brief 这个文件就是处理 ES 存储文档特征向量的集中处理
// INFO @brief 这个文件就是处理 ES 存储文档特征向量的集中处理
func CreateDocESFactory() *Doc {
return &Doc{}
}
type Doc struct {
Id int64 `json:"id"` // 对应 MySQL 中存储的文档 ID。
Content string `json:"content"`
Embedding []float64 `json:"embedding"`
}
@ -15,6 +16,7 @@ func (d *Doc) IndexName() string {
return "catface_docs"
}
func (d *Doc) InsertDocument() error {
return nil
}
// UPDATE 因为 chunck 还是 Python 来处理会比较方便,所以 Go 这边主要还是处理查询相关的操作。
// func (d *Doc) InsertDocument() error {
// return nil
// }

View File

@ -67,16 +67,16 @@ FileUploadSetting:
- "image/png" #png图片格式
# - "image/x-icon" #ico图片
- "image/bmp" #bmp图片
# - "application/zip" #xlsx、docx、zip
# - "application/x-gzip" #tar.gz
- "text/plain; charset=utf-8" #txt log json等文本文件
# - "video/mp4" #视频文件例如mp4
# - "audio/mpeg" #音频文件,例如: mp3
# TAG 文档
- "application/msword" # .doc
- "application/zip" #xlsx、docx、zip
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document" # .docx
- "application/pdf" # .pdf
- "application/octet-stream" # 适配 APIfox 的调用
AvatarWidth: 200
DocsRootPath: "docs" # TODO 或许 upload 模块可以写一下自动区分大致的文件类型所在的位置。