added baml test fix and format
This commit is contained in:
parent
861ae205d2
commit
8f9e289a83
3 changed files with 5 additions and 1 deletions
3
.github/workflows/basic_tests.yml
vendored
3
.github/workflows/basic_tests.yml
vendored
|
|
@ -189,6 +189,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python-version }}
|
python-version: ${{ inputs.python-version }}
|
||||||
|
|
||||||
|
- name: Install BAML Dependencies
|
||||||
|
run: uv add "cognee[baml]"
|
||||||
|
|
||||||
- name: Run Simple Examples
|
- name: Run Simple Examples
|
||||||
run: uv run python ./examples/python/simple_example.py
|
run: uv run python ./examples/python/simple_example.py
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
from cognee.infrastructure.data.exceptions.exceptions import KeywordExtractionError
|
from cognee.infrastructure.data.exceptions.exceptions import KeywordExtractionError
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,10 @@ proxy_url = "https://test.prometh.ai"
|
||||||
def get_entities(tagged_tokens):
|
def get_entities(tagged_tokens):
|
||||||
try:
|
try:
|
||||||
import nltk
|
import nltk
|
||||||
|
|
||||||
nltk.download("maxent_ne_chunker", quiet=True)
|
nltk.download("maxent_ne_chunker", quiet=True)
|
||||||
from nltk.chunk import ne_chunk
|
from nltk.chunk import ne_chunk
|
||||||
|
|
||||||
return ne_chunk(tagged_tokens)
|
return ne_chunk(tagged_tokens)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue