Download the PHP package maximerenou/hugging-chat without Composer
On this page you can find all versions of the php package maximerenou/hugging-chat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package hugging-chat
HuggingChat client
This is an unofficial PHP client for HuggingChat (OpenAssistant's LLaMA model).
HuggingChat API is evolving fast with recurring breaking changes. I try to keep up with it, but it may not always work as expected. Feel free to open an issue if you encounter any problem.
Installation
composer require maximerenou/hugging-chat
Demo
Run examples/chat.php
to test it.
Usage
Real-time / progressive answer
You may pass a function as second argument to get real-time progression:Resume a conversation
If you want to resume a previous conversation, you can retrieve its identifiers:Use another model
You can use a specific model: Default is OpenAssistant.Generate a conversation's summary
Useful to give a title to a conversation.Turn on/off data sharing
HuggingChat share your conversations to improve the model. You can turn on/off data sharing:Delete a conversation
Handle HuggingChat errors
The code throws exceptions when it receives an error from HuggingChat. You can therefore use a try/catch block to handle errors.Answers are sometimes malformed (or dumb)
Answers quality depends on the model you're using.Disclaimer
Using HuggingChat outside huggingface.co/chat may violate HuggingFace terms. Use it at your own risk.
All versions of hugging-chat with dependencies
PHP Build Version
Package Version
The package maximerenou/hugging-chat contains the following files
Loading the files please wait ....