[Bug fix] Anthropic, Llama2 and VertexAI LLMs dependencies (#820)

This commit is contained in:
Sidharth Mohanty
2023-10-18 13:40:46 +05:30
committed by GitHub
parent d8a7d71344
commit 65a20aa457
6 changed files with 40 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
import importlib
import os
from typing import Optional
@@ -7,6 +8,14 @@ from embedchain.config import BaseLlmConfig
from embedchain.helper.json_serializable import register_deserializable
from embedchain.llm.base import BaseLlm
try:
importlib.import_module("replicate")
except ModuleNotFoundError:
raise ModuleNotFoundError(
"The required dependencies for Llama2 are not installed."
'Please install with `pip install --upgrade "embedchain[llama2]"`'
) from None
@register_deserializable
class Llama2Llm(BaseLlm):