mb-rag 1.1.9__py3-none-any.whl → 1.1.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mb-rag might be problematic. Click here for more details.

mb_rag/chatbot/basic.py CHANGED
@@ -66,7 +66,9 @@ class ModelFactory:
66
66
  'anthropic': self.create_anthropic,
67
67
  'google': self.create_google,
68
68
  'ollama': self.create_ollama,
69
- 'groq': self.create_groq
69
+ 'groq': self.create_groq,
70
+ 'deepseek': self.create_deepseek,
71
+ 'qwen' : self.create_qwen,
70
72
  }
71
73
 
72
74
  model_data = creators.get(model_type)
@@ -139,12 +141,12 @@ class ModelFactory:
139
141
  Returns:
140
142
  Ollama: Chatbot model
141
143
  """
142
- if not check_package("langchain_community"):
144
+ if not check_package("langchain-ollama"):
143
145
  raise ImportError("Langchain Community package not found. Please install it using: pip install langchain-community")
144
146
 
145
- from langchain_community.llms import Ollama
147
+ from langchain_ollama import ChatOllama
146
148
  kwargs["model"] = model_name
147
- return Ollama(**kwargs)
149
+ return ChatOllama(**kwargs)
148
150
 
149
151
  @classmethod
150
152
  def create_groq(cls, model_name: str = "llama-3.3-70b-versatile", **kwargs) -> Any:
@@ -163,6 +165,40 @@ class ModelFactory:
163
165
  kwargs["model"] = model_name
164
166
  return ChatGroq(**kwargs)
165
167
 
168
+ @classmethod
169
+ def create_deepseek(cls, model_name: str = "deepseek-chat", **kwargs) -> Any:
170
+ """
171
+ Create Deepseek chatbot model
172
+ Args:
173
+ model_name (str): Name of the model
174
+ **kwargs: Additional arguments
175
+ Returns:
176
+ ChatDeepseek: Chatbot model
177
+ """
178
+ if not check_package("langchain_deepseek"):
179
+ raise ImportError("Langchain Deepseek package not found. Please install it using: pip install langchain-deepseek")
180
+
181
+ from langchain_deepseek import ChatDeepSeek
182
+ kwargs["model"] = model_name
183
+ return ChatDeepSeek(**kwargs)
184
+
185
+ @classmethod
186
+ def create_qwen(cls, model_name: str = "qwen", **kwargs) -> Any:
187
+ """
188
+ Create Qwen chatbot model
189
+ Args:
190
+ model_name (str): Name of the model
191
+ **kwargs: Additional arguments
192
+ Returns:
193
+ ChatQwen: Chatbot model
194
+ """
195
+ if not check_package("langchain_community"):
196
+ raise ImportError("Langchain Qwen package not found. Please install it using: pip install langchain_community")
197
+
198
+ from langchain_community.chat_models.tongyi import ChatTongyi
199
+ kwargs["model"] = model_name
200
+ return ChatTongyi(streaming=True,**kwargs)
201
+
166
202
  def _reset_model(self):
167
203
  """Reset the model"""
168
204
  self.model = self.model.reset()
mb_rag/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  MAJOR_VERSION = 1
2
2
  MINOR_VERSION = 1
3
- PATCH_VERSION = 9
3
+ PATCH_VERSION = 11
4
4
  version = '{}.{}.{}'.format(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION)
5
5
  __all__ = ['MAJOR_VERSION', 'MINOR_VERSION', 'PATCH_VERSION', 'version']
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: mb_rag
3
- Version: 1.1.9
3
+ Version: 1.1.11
4
4
  Summary: RAG function file
5
5
  Author: ['Malav Bateriwala']
6
6
  Requires-Python: >=3.8
@@ -1,7 +1,7 @@
1
1
  mb_rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- mb_rag/version.py,sha256=OJ5C8dPfTjHQppzvBtr3tex8vKiblUMZ8i5wkIS8_U0,206
2
+ mb_rag/version.py,sha256=HzmwFCQOy09joW49HSdBMmEK0R29-zIwhOZLIVAahFo,207
3
3
  mb_rag/chatbot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- mb_rag/chatbot/basic.py,sha256=19spb9hBOhO4UYUZ3q6bzBOHnCrq6sqPFS0EhGPIugw,15448
4
+ mb_rag/chatbot/basic.py,sha256=CQj9lXe3VNOADWQANWhR8aUmAz9efe3gwZfMYLVm1_0,16806
5
5
  mb_rag/chatbot/chains.py,sha256=vDbLX5R29sWN1pcFqJ5fyxJEgMCM81JAikunAEvMC9A,7223
6
6
  mb_rag/chatbot/prompts.py,sha256=n1PyiLbU-5fkslRv6aVOzt0dDlwya_cEdQ7kRnRhMuY,1749
7
7
  mb_rag/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -9,7 +9,7 @@ mb_rag/rag/embeddings.py,sha256=KjBdekFDb5M3dRMco4r3dDMXMsG5dxdzKImuVIipsd0,2709
9
9
  mb_rag/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  mb_rag/utils/bounding_box.py,sha256=G0hdDam8QmYtD9lfwMeDHGm-TTo6KZg-yK5ESFL9zaM,8366
11
11
  mb_rag/utils/extra.py,sha256=spbFrGgdruNyYQ5PzgvpSIa6Nm0rn9bb4qc8W9g582o,2492
12
- mb_rag-1.1.9.dist-info/METADATA,sha256=XPqRcdq60lulFNTaphL63ke0xn8pAEUhwf_OBStADT4,233
13
- mb_rag-1.1.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
14
- mb_rag-1.1.9.dist-info/top_level.txt,sha256=FIK1eAa5uYnurgXZquBG-s3PIy-HDTC5yJBW4lTH_pM,7
15
- mb_rag-1.1.9.dist-info/RECORD,,
12
+ mb_rag-1.1.11.dist-info/METADATA,sha256=LM1DLdW_H0bhI9kvwiOjJyUxlKhL_EQ6WoraLL-skT4,234
13
+ mb_rag-1.1.11.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
14
+ mb_rag-1.1.11.dist-info/top_level.txt,sha256=FIK1eAa5uYnurgXZquBG-s3PIy-HDTC5yJBW4lTH_pM,7
15
+ mb_rag-1.1.11.dist-info/RECORD,,