Soulter / hugging-chat-api

HuggingChat Python API🤗
GNU Affero General Public License v3.0
861 stars 123 forks source link

Feature request: Assistant support #175

Closed PhoenixR49 closed 9 months ago

PhoenixR49 commented 9 months ago

Recently, Hugging Face has introduced community assistants that can be used to perform specific tasks such as generating images or assisting you with the design of your site.

Screenshot Screenshot

I think that integrating these assistants into the API could be interesting and useful.

Soulter commented 9 months ago

Hi, thanks for your suggestion, we'll support it soon.

Soulter commented 9 months ago

hello, the latest version of hugchat has supported assistant, you can update hugchat

pip3 install -U hugchat

example codes:

# ... login
assistant = chatbot.search_assistant(assistant_name="ChatGpt") # assistant name list in https://huggingface.co/chat/assistants
assistant_list = chatbot.get_assistant_list_by_page(page=0)
chatbot.new_conversation(assistant=assistant, switch_to=True) # create a new conversation with assistant
PhoenixR49 commented 9 months ago

Thank you very much!