ragflow/rag/utils
alkscr 9e7d052c8d
Fix: knowledge graph resolution with infinity raise error tokenizing in specific situations (#7048)
### What problem does this PR solve?

When running graph resolution with infinity, if single quotation marks
appeared in the entities name that to be delete, an error tokenizing of
sqlglot might occur after calling infinity.

For example:
```
INFINITY delete table ragflow_xxx, filter knowledge_graph_kwd IN ('entity') AND entity_kwd IN ('86 IMAGES FROM PREVIOUS CONTESTS', 'ADAM OPTIMIZATION', 'BACKGROUND'ESTIMATION')
```
may raise error
```
Error tokenizing 'TS', 'ADAM OPTIMIZATION', 'BACKGROUND'ESTIMATION''
```
and make the document parsing failed。

Replace one single quotation mark with double single quotation marks can
let sqlglot tokenize the entity name correctly.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-04-17 16:15:21 +08:00
..
__init__.py Fix: type violations. (#6262) 2025-03-19 12:12:34 +08:00
azure_sas_conn.py refactor: no need to inherit in python3 clean the code (#5659) 2025-03-05 18:03:53 +08:00
azure_spn_conn.py refactor: no need to inherit in python3 clean the code (#5659) 2025-03-05 18:03:53 +08:00
doc_store_conn.py Update comments (#4569) 2025-01-21 20:52:28 +08:00
es_conn.py Fix: Handle the case of deleting empty blocks. Update the relevant message (#6643) 2025-04-02 19:20:17 +08:00
infinity_conn.py Fix: knowledge graph resolution with infinity raise error tokenizing in specific situations (#7048) 2025-04-17 16:15:21 +08:00
minio_conn.py fix:  Remove unnecessary minio initialization (#6544) 2025-03-27 09:54:25 +08:00
oss_conn.py refactor: no need to inherit in python3 clean the code (#5659) 2025-03-05 18:03:53 +08:00
redis_conn.py Fix set_graph on non-existing edge (#6777) 2025-04-03 11:09:04 +08:00
s3_conn.py Feat: extend S3 storage compatibility and add knowledge base ID prefix (#6355) 2025-03-31 16:09:43 +08:00
storage_factory.py Feat: Accessing Alibaba Cloud OSS with Amazon S3 SDK (#5438) 2025-02-27 17:02:42 +08:00
tavily_conn.py Feat: apply LLM to optimize citations. (#5935) 2025-03-11 19:56:21 +08:00