A képet Author with Midjourney készítette
You’ve seen so many alternatives to ChatGPT of late, but have you checked out HuggingChat from HuggingFace?
HuggingChat is a free and open source alternative to commercial chat offerings such as ChatGPT. In theory, the service could leverage numerous models, yet I have only seen it use LLaMa 30B SFT 6 (oasst-sft-6-láma-30b) ból ből OpenAssistant eddig.
You can find out all about OpenAssistant’s interesting efforts to build their chatbot itt. While the model may not be GPT4 level, it is definitely a capable LLM with an interesting training story that is worth checking out.
Free and open source? Sounds great. But wait… there’s more!
Can’t get access to the ChatGPT4 API? Sick of paying for it even if you can? Why not give the unofficial HuggingChat Python API próba?
No API keys. No signup. No nothin’! Just pip install hugface
, then copy, paste and run the below sample script from the command line.
#!/usr/bin/env python
# -*- coding: utf-8 -*- from hugchat import hugchat # Create a chatbot connection
chatbot = hugchat.ChatBot() # New a conversation (ignore error)
id = chatbot.new_conversation()
chatbot.change_conversation(id) # Intro message
print('[[ Welcome to ChatPAL. Let's talk! ]]')
print(''q' or 'quit' to exit')
print(''c' or 'change' to change conversation')
print(''n' or 'new' to start a new conversation') while True: user_input = input('> ') if user_input.lower() == '': pass elif user_input.lower() in ['q', 'quit']: break elif user_input.lower() in ['c', 'change']: print('Choose a conversation to switch to:') print(chatbot.get_conversation_list()) elif user_input.lower() in ['n', 'new']: print('Clean slate!') id = chatbot.new_conversation() chatbot.change_conversation(id) else: print(chatbot.chat(user_input))
Run the script — ./huggingchat.py
, or whatever you named the file — and get something like the following (after saying hello):
The barebones sample script takes input and passes it to the API, displaying the results as they are returned. The only interpretation of input by the script is to look for a keyword to quit, a keyword to start a new conversation, or a keyword to change to a pre-existing alternative conversation that you already have underway. All are self-explanatory.
For more information on the library, including the chat() function parameters, check out its GitHub repo.
There are all sorts of interesting use cases for a chatbot API, specially one that you are free to explore without a hit to your wallet. You are only limited by your imagination.
Boldog kódolást!
Matthew Mayo (@mattmayo13) egy adattudós és a KDnuggets, az adattudományi és gépi tanulás alapvető online forrásának főszerkesztője. Érdeklődési köre a természetes nyelvi feldolgozás, az algoritmusok tervezése és optimalizálása, a felügyelet nélküli tanulás, a neurális hálózatok és a gépi tanulás automatizált megközelítései. Matthew informatikus mesterfokozattal és adatbányászatból szerzett diplomát. Elérhető a kdnuggets[dot]com editor1 címen.
- SEO által támogatott tartalom és PR terjesztés. Erősödjön még ma.
- PlatoAiStream. Web3 adatintelligencia. Felerősített tudás. Hozzáférés itt.
- A jövő pénzverése – Adryenn Ashley. Hozzáférés itt.
- Forrás: https://www.kdnuggets.com/2023/05/huggingchat-python-api-alternative.html?utm_source=rss&utm_medium=rss&utm_campaign=huggingchat-python-api-your-no-cost-alternative
- :is
- :nem
- 13
- a
- Rólunk
- hozzáférés
- Után
- algoritmus
- Minden termék
- már
- alternatív
- alternatívák
- an
- és a
- api
- megközelít
- VANNAK
- AS
- At
- szerző
- Automatizált
- BE
- lent
- szünet
- épít
- de
- by
- TUD
- képes
- esetek
- változik
- chatbot
- ChatGPT
- ellenőrizze
- ellenőrzött
- ellenőrzése
- A pop-art design, négy időzóna kijelzése egyszerre és méretének arányai azok az érvek, amelyek a NeXtime Time Zones-t kiváló választássá teszik. Válassza a
- Kódolás
- kereskedelmi
- számítógép
- Computer Science
- kapcsolat
- Beszélgetés
- tudott
- teremt
- készítette
- dátum
- adatbányászat
- adat-tudomány
- adattudós
- minden bizonnyal
- Fok
- Design
- megjelenítő
- DOT
- főszerkesztő
- erőfeszítések
- hiba
- Eter (ETH)
- Még
- Kilépés
- feltárása
- messze
- filé
- Találjon
- következő
- A
- Ingyenes
- ból ből
- funkció
- kap
- GitHub
- Ad
- diplomás
- nagy
- Legyen
- he
- övé
- Találat
- tart
- HTTPS
- HuggingFace
- i
- ID
- if
- képzelet
- importál
- in
- Beleértve
- információ
- bemenet
- telepíteni
- érdekes
- érdekek
- értelmezés
- IT
- ITS
- jpg
- éppen
- KDnuggets
- kulcsok
- nyelv
- Késő
- tanulás
- szint
- Tőkeáttétel
- könyvtár
- mint
- Korlátozott
- vonal
- Láma
- néz
- gép
- gépi tanulás
- sok
- mester
- matthew
- Lehet..
- üzenet
- Bányászati
- modell
- modellek
- több
- Nevezett
- Természetes
- Természetes nyelv
- Természetes nyelvi feldolgozás
- hálózatok
- ideg-
- neurális hálózatok
- Új
- nem
- számos
- of
- Ajánlat
- on
- ONE
- online
- csak
- nyitva
- nyílt forráskódú
- optimalizálás
- or
- ki
- paraméterek
- elhalad
- bérletek
- fizet
- Plató
- Platón adatintelligencia
- PlatoData
- feldolgozás
- Piton
- elérte
- forrás
- Eredmények
- futás
- s
- mondás
- Tudomány
- Tudós
- látott
- szolgáltatás
- So
- valami
- forrás
- különösen
- kezdet
- Történet
- ilyen
- kapcsoló
- tart
- hogy
- A
- azok
- akkor
- Ott.
- ők
- ezt
- nak nek
- Képzések
- igaz
- úton
- felügyelet nélküli tanulás
- használ
- Ve
- várjon
- pénztárca
- fogadtatás
- míg
- miért
- val vel
- nélkül
- érdemes
- még
- te
- A te
- youtube
- zephyrnet