mb-rag 1.1.6__py3-none-any.whl → 1.1.7__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
@@ -54,7 +54,7 @@ class ModelFactory:
54
54
  """
55
55
  Factory method to create any type of model
56
56
  Args:
57
- model_type (str): Type of model to create. Default is OpenAI. Options are openai, anthropic, google, ollama
57
+ model_type (str): Type of model to create. Default is OpenAI. Options are openai, anthropic, google, ollama , groq
58
58
  model_name (str): Name of the model
59
59
  **kwargs: Additional arguments
60
60
  Returns:
@@ -64,7 +64,8 @@ class ModelFactory:
64
64
  'openai': self.create_openai,
65
65
  'anthropic': self.create_anthropic,
66
66
  'google': self.create_google,
67
- 'ollama': self.create_ollama
67
+ 'ollama': self.create_ollama,
68
+ 'groq': self.create_groq
68
69
  }
69
70
 
70
71
  model_data = creators.get(model_type)
@@ -144,6 +145,23 @@ class ModelFactory:
144
145
  kwargs["model"] = model_name
145
146
  return Ollama(**kwargs)
146
147
 
148
+ @classmethod
149
+ def create_groq(cls, model_name: str = "llama-3.3-70b-versatile", **kwargs) -> Any:
150
+ """
151
+ Create Groq chatbot model
152
+ Args:
153
+ model_name (str): Name of the model
154
+ **kwargs: Additional arguments. Options are: temperature, groq_api_key, model_name
155
+ Returns:
156
+ ChatGroq: Chatbot model
157
+ """
158
+ if not check_package("langchain-groq"):
159
+ raise ImportError("Langchain Groq package not found. Please install it using: pip install langchain-groq")
160
+
161
+ from langchain_groq import ChatGroq
162
+ kwargs["model"] = model_name
163
+ return ChatGroq(**kwargs)
164
+
147
165
  def invoke_query(self,query: str,get_content_only: bool = True,images: list = None,pydantic_model = None) -> str:
148
166
  """
149
167
  Invoke the model
mb_rag/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  MAJOR_VERSION = 1
2
2
  MINOR_VERSION = 1
3
- PATCH_VERSION = 6
3
+ PATCH_VERSION = 7
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.6
3
+ Version: 1.1.7
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=WILNiQZrHE_E8TaKdRSqSywIA2x-8Z8oGUEwvLmUqMI,206
2
+ mb_rag/version.py,sha256=Cpayvd-NH5r-VWXnUrdxc3Wl5e2683dhC75IB5-U87A,206
3
3
  mb_rag/chatbot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- mb_rag/chatbot/basic.py,sha256=WDHwZruyH8dsy5D_mynd0mHUOlWJj6b07ysvUzhvwhk,14294
4
+ mb_rag/chatbot/basic.py,sha256=2TNPI1gAOGvhw1jgjGhy4M972tHVwNTs_cZR65PO8HM,14996
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.6.dist-info/METADATA,sha256=Uky2vBxSFzxTvz8VR-l_6CDGsAXve3m6lnIoF2PUR9A,233
13
- mb_rag-1.1.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
14
- mb_rag-1.1.6.dist-info/top_level.txt,sha256=FIK1eAa5uYnurgXZquBG-s3PIy-HDTC5yJBW4lTH_pM,7
15
- mb_rag-1.1.6.dist-info/RECORD,,
12
+ mb_rag-1.1.7.dist-info/METADATA,sha256=q-CMqSDz0STKKK-EftC6W-HsjqO3kBgDhdW5F2mwo6s,233
13
+ mb_rag-1.1.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
14
+ mb_rag-1.1.7.dist-info/top_level.txt,sha256=FIK1eAa5uYnurgXZquBG-s3PIy-HDTC5yJBW4lTH_pM,7
15
+ mb_rag-1.1.7.dist-info/RECORD,,
File without changes