Upload folder using huggingface_hub
Browse files- advanced_rag.py +1 -3
advanced_rag.py
CHANGED
|
@@ -161,7 +161,7 @@ class ElevatedRagChain:
|
|
| 161 |
@property
|
| 162 |
def _llm_type(self) -> str:
|
| 163 |
return "remote_llm"
|
| 164 |
-
def _call(self, prompt: str, stop: Optional[List[str]] = None) -> str:
|
| 165 |
return remote_generate(prompt)
|
| 166 |
@property
|
| 167 |
def _identifying_params(self) -> dict:
|
|
@@ -173,8 +173,6 @@ class ElevatedRagChain:
|
|
| 173 |
mistral_api_key = os.environ.get("MISTRAL_API_KEY")
|
| 174 |
if not mistral_api_key:
|
| 175 |
raise ValueError("Please set the MISTRAL_API_KEY environment variable to use Mistral API.")
|
| 176 |
-
if not MISTRAL_AVAILABLE:
|
| 177 |
-
raise ImportError("Mistral client library not installed. Install with: pip install mistralai")
|
| 178 |
from langchain.llms.base import LLM
|
| 179 |
from typing import Any, Optional, List
|
| 180 |
class MistralLLM(LLM):
|
|
|
|
| 161 |
@property
|
| 162 |
def _llm_type(self) -> str:
|
| 163 |
return "remote_llm"
|
| 164 |
+
def _call(self, prompt: str, stop: typing.Optional[List[str]] = None) -> str:
|
| 165 |
return remote_generate(prompt)
|
| 166 |
@property
|
| 167 |
def _identifying_params(self) -> dict:
|
|
|
|
| 173 |
mistral_api_key = os.environ.get("MISTRAL_API_KEY")
|
| 174 |
if not mistral_api_key:
|
| 175 |
raise ValueError("Please set the MISTRAL_API_KEY environment variable to use Mistral API.")
|
|
|
|
|
|
|
| 176 |
from langchain.llms.base import LLM
|
| 177 |
from typing import Any, Optional, List
|
| 178 |
class MistralLLM(LLM):
|