Skip to content

Commit 88157d7

Browse files
committed
Fix RAG indexing for docs note
1 parent 9dcce64 commit 88157d7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

model/rag/index.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ func callRAGIndexer(inst *instance.Instance, doctype string, change couchdb.Chan
174174
content = bytes.NewReader(md)
175175
// See https://github.com/OpenLLM-France/RAGondin/issues/88
176176
name = strings.TrimSuffix(name, consts.NoteExtension) + consts.MarkdownExtension
177-
} else if strings.HasSuffix(name, consts.DocsExtension) {
178-
// See https://github.com/OpenLLM-France/RAGondin/issues/88
179-
name = strings.TrimSuffix(name, consts.DocsExtension) + consts.MarkdownExtension
180177
} else {
181178
fs := inst.VFS()
182179
fileDoc := &vfs.FileDoc{
@@ -192,6 +189,10 @@ func callRAGIndexer(inst *instance.Instance, doctype string, change couchdb.Chan
192189
}
193190
defer f.Close()
194191
content = f
192+
if strings.HasSuffix(name, consts.DocsExtension) {
193+
// See https://github.com/OpenLLM-France/RAGondin/issues/88
194+
name = strings.TrimSuffix(name, consts.DocsExtension) + consts.MarkdownExtension
195+
}
195196
}
196197

197198
var requestBody bytes.Buffer

0 commit comments

Comments
 (0)