Una libreria para usar modelos de Chat en huggingface
Project description
Bienvenido a ModelChat
Empieza a usar ModelChat ModelChat es una libreria gratuita para implementar modelos de lenguaje alojados en Huggingface de forma mas simple y menos compleja La tarea principal de ModelChat es su uso en la creacion de chatbots o bots Conversacionales con python ModelChat tambien puede implementarce en bots como Telegram y Discord
instala ModelChat:
pip3 install ModelChat
Uso de ModelChat:
from ModelChat import simulate_conversation
chatbot=simulate_conversation(
model_name='OpenAssistant/oasst-sft-1-pythia-12b',
token='XXXXX',
prompt='Simulate a Conversation With an AI her name is Mia (Artificial Intelligence Model) she is smart and friendly she likes to talk a lot, she speaks mainly in Spanish',
user_intent='Mensaje que mandas al modelo,
max_tokens=1024,
)
print('Bot:', chatbot)
Recuerda que en el apartado de Model Name='Puedes poner Cualquier modelo alojado en Huggingface', token='', es el valor del token que generes en huggingface recuerda registrarte antes, prompt='', es para darle un rol al modelo de lenguaje, user_intent='' En este apartado va tu mensaje que respondera el modelo, max_tokens='' numero maximo de tokens que usara el modelo el limite es de 1024
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for modelchat-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db81ca7b001d6d3484c5c4a33e797fd4cdb11d78f0a690d629bff364e494a83c |
|
MD5 | 0bf9e3df1c043c3573a2d206948cf1d6 |
|
BLAKE2b-256 | 4a842b58f87795d95495d7a065dc90955d5351ba5fa73b7ada93b83edefba38c |