Open davidmigloz opened 1 year ago
any update on this?
No progress yet, unfortunately.
It should be pretty straightforward to integrate. There's already a Dart client (huggingface_dart), so it's just about implementing the LangChain.dart wrappers around it.
Happy to help if anyone wants to give it a try.
thanks for the update
hii! can i work on this task using huggingface_client: pkg i try (huggingface_dart) it is missing some api like audio and vision apis can u assign me this task and kindly guide which pkg I should use i also mange hugging face client pkg recently i worked on it resolve some issue ,and add new text to image API
@huzaifansari54 that would be great
Hey @huzaifansari54,
That would be great 🙂
You can add the implementation to the langchain_huggingface package. You can check how other integrations are implemented (eg. ChatAnthropic), it should be pretty similar.
Let me know if you have any questions or issues!
Can suggest me docs of python or javascript of hugging face lang chain implementation it would be great 👍
Let's start with the LLM integration (the Hugging Face Inference Endpoint):
In LangChain python, the wrapper is called HuggingFaceEndpoint
:
In LangChain JS, the wrapper is called HuggingFaceInference
:
Which name do you prefer? I would say HuggingFaceInference
sounds better.
To start the implementation:
llm
directory (langchain_huggingface/lib/src/llm
)huggingface_inference.dart
: where the wrapper implementation will go
b. types.dart
: where to place the HuggingFaceInferenceOptions
class
c. mappers.dart
: where to place all the mapping logic from the huggingface_client
classes to the LangChain.dart ones.HuggingFaceInferenceOptions
HuggingFaceInference
wrapper that calls the client with the passed options and maps the reponse to the LangChain.dart abstractions using the mappers.You can check other integrations to have a reference.
thanks
hugging face llm is done but there is an issue in hugging_face_client pkg i resolved the issue and sent a pull request ASAP this pull request 17 merge by owner of pkg . also i start working on chat model support for Hugging face when it is complete i will start work on chat model for lang chain dart hugging face
Great progress, thanks for the update!
https://python.langchain.com/en/latest/modules/models/llms/integrations/huggingface_hub.html