fix: update embedding exception imports
This commit is contained in:
parent
427d67babf
commit
76143a7d48
2 changed files with 3 additions and 7 deletions
|
|
@ -4,7 +4,7 @@ from fastembed import TextEmbedding
|
||||||
import litellm
|
import litellm
|
||||||
import os
|
import os
|
||||||
from cognee.infrastructure.databases.vector.embeddings.EmbeddingEngine import EmbeddingEngine
|
from cognee.infrastructure.databases.vector.embeddings.EmbeddingEngine import EmbeddingEngine
|
||||||
from cognee.infrastructure.databases.exceptions.EmbeddingException import EmbeddingException
|
from cognee.infrastructure.databases.exceptions import EmbeddingException
|
||||||
from cognee.infrastructure.llm.tokenizer.TikToken import (
|
from cognee.infrastructure.llm.tokenizer.TikToken import (
|
||||||
TikTokenTokenizer,
|
TikTokenTokenizer,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -250,9 +250,7 @@ def embedding_rate_limit_sync(func):
|
||||||
logger.warning(error_msg)
|
logger.warning(error_msg)
|
||||||
|
|
||||||
# Create a custom embedding rate limit exception
|
# Create a custom embedding rate limit exception
|
||||||
from cognee.infrastructure.databases.exceptions.EmbeddingException import (
|
from cognee.infrastructure.databases.exceptions import EmbeddingException
|
||||||
EmbeddingException,
|
|
||||||
)
|
|
||||||
|
|
||||||
raise EmbeddingException(error_msg)
|
raise EmbeddingException(error_msg)
|
||||||
|
|
||||||
|
|
@ -307,9 +305,7 @@ def embedding_rate_limit_async(func):
|
||||||
logger.warning(error_msg)
|
logger.warning(error_msg)
|
||||||
|
|
||||||
# Create a custom embedding rate limit exception
|
# Create a custom embedding rate limit exception
|
||||||
from cognee.infrastructure.databases.exceptions.EmbeddingException import (
|
from cognee.infrastructure.databases.exceptions import EmbeddingException
|
||||||
EmbeddingException,
|
|
||||||
)
|
|
||||||
|
|
||||||
raise EmbeddingException(error_msg)
|
raise EmbeddingException(error_msg)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue