Closed SamTheCoder777 closed 3 months ago
I think this a great feature but I think making a whole new ParseraHuggingFace is unnecessary unless there's something that I'm missing. I think it would be better if you could either make the ParseraHuggingFace class inherit _run, run, and arun from Parsera since those seem to be mostly untouched, or even better just add the HuggingFace support to the existing Parsera class potentially with some helper methods.
I’ve removed the unnecessary ParseraHuggingFace
class to avoid code duplication. Now, HuggingFaceModel
integrates directly with Parsera
as it's already a BaseChatModel
instance.
This PR introduces support for HuggingFace
Transformers
inParsera
by adding a newHuggingFaceModel
. Users only need to installTransformers
when they choose to use it, as the module is not loaded untilParsera
is initialized withHuggingFaceModel
as the model.This PR introduces support for HuggingFace Transformers by adding a new class,ParseraHuggingFace
. The class is designed for lazy loading, ensuring that users only install thetransformers
library if they choose to use it.List of changes:
HuggingFaceModel
inmodel.py
HuggingFaceModel
inParsera
README
with examples for usingHuggingFaceModel
withParsera
- Added:ParseraHuggingFace
class for HuggingFace integration.