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.
- {mb_rag-1.1.29 → mb_rag-1.1.30}/PKG-INFO +1 -1
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/chatbot/basic.py +4 -3
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/version.py +1 -1
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag.egg-info/PKG-INFO +1 -1
- {mb_rag-1.1.29 → mb_rag-1.1.30}/README.md +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/__init__.py +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/chatbot/__init__.py +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/chatbot/chains.py +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/chatbot/prompts.py +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/rag/__init__.py +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/rag/embeddings.py +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/utils/__init__.py +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/utils/bounding_box.py +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/utils/document_extract.py +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/utils/extra.py +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag/utils/pdf_extract.py +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag.egg-info/SOURCES.txt +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag.egg-info/dependency_links.txt +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag.egg-info/requires.txt +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/mb_rag.egg-info/top_level.txt +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/pyproject.toml +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/setup.cfg +0 -0
- {mb_rag-1.1.29 → mb_rag-1.1.30}/setup.py +0 -0
|
@@ -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
|
-
|
|
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.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|