Skip to content

Commit

Permalink
feat: add new EntityExtractor as option
Browse files Browse the repository at this point in the history
note: extractors are currently off by default.
  • Loading branch information
janaka committed Sep 27, 2023
1 parent 6b2169b commit 42790ae
Show file tree
Hide file tree
Showing 3 changed files with 254 additions and 1 deletion.
252 changes: 251 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ opendal = "^0.38.1"
llama-index = "0.8.34"
transformers = "^4.33.2"
optimum = {extras = ["exporters"], version = "^1.13.2"}
span-marker = "^1.3.0"

[tool.poetry.group.dev.dependencies]
pre-commit = "^2.18.1"
Expand Down
2 changes: 2 additions & 0 deletions source/docq/support/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from llama_index.indices.composability import ComposableGraph
from llama_index.node_parser import SimpleNodeParser
from llama_index.node_parser.extractors import (
EntityExtractor,
KeywordExtractor,
MetadataExtractor,
QuestionsAnsweredExtractor,
Expand Down Expand Up @@ -179,6 +180,7 @@ def _get_node_parser() -> SimpleNodeParser:
QuestionsAnsweredExtractor(questions=3),
SummaryExtractor(summaries=["prev", "self"]),
KeywordExtractor(keywords=10),
EntityExtractor(entities=["prev", "self"]),
# CustomExtractor()
],
)
Expand Down

0 comments on commit 42790ae

Please sign in to comment.