Skip to content

[Bug] [Module Name] Bug title #743

@YourCuteness

Description

@YourCuteness

Search before asking

  • I had searched in the issues and found no similar issues.

Operating system information

Linux

What happened

KAG/kag/builder/component/extractor/schema_free_extractor.py 中 SchemaFreeExtractor 的 _invoke 方法
triples = (self.triples_extraction(passage, filtered_entities),) 将triples 封装为了tuple,但是在后续循环中这里需要一个三元组的list
for tri in triples:
if tri is None or len(tri) != 3:
这导致所有的关系全被被吞,无法使用同步方法抽取正常关系组。而异步方法则能正确拿到triples
triples, std_entities = await asyncio.gather(
self.atriples_extraction(passage, filtered_entities),
self.anamed_entity_standardization(passage, filtered_entities),
)
这里的triples则为三元组的list

How to reproduce

正常构建kag,使用同步方法正常运行,无法抽取关系

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions