|
|
|
@ -58,7 +58,7 @@ class AlephAlphaAsymmetricSemanticEmbedding(BaseModel, Embeddings):
|
|
|
|
|
except ImportError:
|
|
|
|
|
raise ValueError(
|
|
|
|
|
"Could not import aleph_alpha_client python package. "
|
|
|
|
|
"Please it install it with `pip install aleph_alpha_client`."
|
|
|
|
|
"Please install it with `pip install aleph_alpha_client`."
|
|
|
|
|
)
|
|
|
|
|
values["client"] = Client(token=aleph_alpha_api_key)
|
|
|
|
|
return values
|
|
|
|
@ -81,7 +81,7 @@ class AlephAlphaAsymmetricSemanticEmbedding(BaseModel, Embeddings):
|
|
|
|
|
except ImportError:
|
|
|
|
|
raise ValueError(
|
|
|
|
|
"Could not import aleph_alpha_client python package. "
|
|
|
|
|
"Please it install it with `pip install aleph_alpha_client`."
|
|
|
|
|
"Please install it with `pip install aleph_alpha_client`."
|
|
|
|
|
)
|
|
|
|
|
document_embeddings = []
|
|
|
|
|
|
|
|
|
@ -121,7 +121,7 @@ class AlephAlphaAsymmetricSemanticEmbedding(BaseModel, Embeddings):
|
|
|
|
|
except ImportError:
|
|
|
|
|
raise ValueError(
|
|
|
|
|
"Could not import aleph_alpha_client python package. "
|
|
|
|
|
"Please it install it with `pip install aleph_alpha_client`."
|
|
|
|
|
"Please install it with `pip install aleph_alpha_client`."
|
|
|
|
|
)
|
|
|
|
|
symmetric_params = {
|
|
|
|
|
"prompt": Prompt.from_text(text),
|
|
|
|
@ -166,7 +166,7 @@ class AlephAlphaSymmetricSemanticEmbedding(AlephAlphaAsymmetricSemanticEmbedding
|
|
|
|
|
except ImportError:
|
|
|
|
|
raise ValueError(
|
|
|
|
|
"Could not import aleph_alpha_client python package. "
|
|
|
|
|
"Please it install it with `pip install aleph_alpha_client`."
|
|
|
|
|
"Please install it with `pip install aleph_alpha_client`."
|
|
|
|
|
)
|
|
|
|
|
query_params = {
|
|
|
|
|
"prompt": Prompt.from_text(text),
|
|
|
|
|