Skip to content

Commit

Permalink
Support Ollama embedding (#67)
Browse files Browse the repository at this point in the history
* Support Ollama

* Update adapter version

* Multiple exception handling
  • Loading branch information
gaya3-zipstack authored Jun 28, 2024
1 parent 97eaf8d commit f7f1427
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 13 deletions.
34 changes: 24 additions & 10 deletions pdm.lock

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

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies = [
"python-magic~=0.4.27",
"python-dotenv==1.0.0",
# LLM Triad
"unstract-adapters~=0.19.2",
"unstract-adapters~=0.20.1",
"llama-index==0.10.38",
"tiktoken~=0.4.0",
"transformers==4.37.0",
Expand Down
2 changes: 1 addition & 1 deletion src/unstract/sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.33.1"
__version__ = "0.34.0"


def get_sdk_version():
Expand Down
2 changes: 1 addition & 1 deletion src/unstract/sdk/utils/callback_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_tokenizer(
model_name
).encode
return tokenizer
except ValueError as e:
except (KeyError, ValueError) as e:
logger.warning(str(e))
return fallback_tokenizer

Expand Down

0 comments on commit f7f1427

Please sign in to comment.