mb-rag 1.1.29__tar.gz → 1.1.30__tar.gz

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mb_rag
3
- Version: 1.1.29
3
+ Version: 1.1.30
4
4
  Summary: RAG function file
5
5
  Author: ['Malav Bateriwala']
6
6
  Requires-Python: >=3.8
@@ -73,6 +73,8 @@ class ModelFactory:
73
73
  'hugging_face': self.create_hugging_face
74
74
  }
75
75
 
76
+ self.model_type = model_type
77
+ self.model_name = model_name
76
78
  model_data = creators.get(model_type)
77
79
  if not model_data:
78
80
  raise ValueError(f"Unsupported model type: {model_type}")
@@ -308,15 +310,14 @@ class ModelFactory:
308
310
  """
309
311
  Function to invoke the model with images
310
312
  Args:
311
- model (ChatOpenAI): Chatbot model
312
313
  images (list): List of images
313
314
  prompt (str): Prompt
314
315
  pydantic_model (PydanticModel): Pydantic model
315
- Returns:
316
+ Returns:
316
317
  str: Output from the model
317
318
  """
318
319
  base64_images = [self._image_to_base64(image) for image in images]
319
- if self.model_name=='ollama':
320
+ if self.model_type =='ollama':
320
321
  ollama_model = self.model.bind(images=[base64_images])
321
322
  response = ollama_model.invoke([HumanMessage(content=prompt)])
322
323
  return response.content
@@ -1,5 +1,5 @@
1
1
  MAJOR_VERSION = 1
2
2
  MINOR_VERSION = 1
3
- PATCH_VERSION = 29
3
+ PATCH_VERSION = 30
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.4
2
2
  Name: mb_rag
3
- Version: 1.1.29
3
+ Version: 1.1.30
4
4
  Summary: RAG function file
5
5
  Author: ['Malav Bateriwala']
6
6
  Requires-Python: >=3.8
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes