江不江
commited on
Commit
·
c9f94cd
1
Parent(s):
5f6673f
fix function create to slove chunk number wrong (#1604)
Browse files### What problem does this PR solve?
fix function create to slove the problem of creating a chunk and
increasing the chunk number by 2.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue) #900
---------
Signed-off-by: seaver <[email protected]>
- api/apps/chunk_app.py +0 -1
api/apps/chunk_app.py
CHANGED
@@ -230,7 +230,6 @@ def create():
|
|
230 |
tenant_id, LLMType.EMBEDDING.value, embd_id)
|
231 |
|
232 |
v, c = embd_mdl.encode([doc.name, req["content_with_weight"]])
|
233 |
-
DocumentService.increment_chunk_num(req["doc_id"], doc.kb_id, c, 1, 0)
|
234 |
v = 0.1 * v[0] + 0.9 * v[1]
|
235 |
d["q_%d_vec" % len(v)] = v.tolist()
|
236 |
ELASTICSEARCH.upsert([d], search.index_name(tenant_id))
|
|
|
230 |
tenant_id, LLMType.EMBEDDING.value, embd_id)
|
231 |
|
232 |
v, c = embd_mdl.encode([doc.name, req["content_with_weight"]])
|
|
|
233 |
v = 0.1 * v[0] + 0.9 * v[1]
|
234 |
d["q_%d_vec" % len(v)] = v.tolist()
|
235 |
ELASTICSEARCH.upsert([d], search.index_name(tenant_id))
|