Projects to test AI chat bots locally

Posted on Tue 02 May 2023 in AI, chat bots, Python, LLM • Tagged with AI, chat bots, Python, LLM, ChatAI, ColossalChat, LocalAI, Text generation web UI, MLC LLM

Many people is interested in trying AI (Artificial Intelligence) chat bots locally, but they don't know how to start. These are some projects that I've found that can be used to test different LLMs (Language Learning Models) and chat bots:

  • Text generation web UI. It tries to be the AUTOMATIC1111/stable-diffusion-webui of text generation. Based on Gradio, it provides a web interface to test different LLMs.

  • Serge. It's an interface based on Svelte as web framework and llama.cpp for running mmodels. It's dockerized. It also provides an API.

  • openplayground. Works with local models and remote APIs. Can be installed as a Python package or run with Docker. It's implemented as a Flask application with a React frontend.

  • ChatAI. It is a desktop application for Windows and Ubuntu developed in Python with PyQt. It uses a Google T5-Flan model and it is based on A. I. Runner, a framework to run AI models.

  • ColossalChat. ColossalAI provides a set of tools to develop deep learning models, and it includes ColossalChat, which is a chat bot based …


Continue reading

Upgrading to dash 2.0

Posted on Tue 05 October 2021 in Python • Tagged with Python, Dash

I had some dashboards built in Python with Dash. They were using version 1.13.4 and I updated it to version 2.0.0. In addition to converting the imports, as explained in the migration guide, I also had to change state variables because I was getting the error:

ValueError: The state keyword argument may not be provided without the input keyword argument

I didn't understand the explanation in the migration guide. After reading the new documentation about callbacks, I've found that I had to change my app_callbacks. Previously, I had something like this:

@app.callback(
    Output(component_id='wl-plot', component_property='src'),
    [
        Input(component_id='sol-select', component_property='value'),
        Input(component_id='button-apply', component_property='n_clicks'),
    ],
    state=
    [
        State(component_id='base-dir', component_property='value'),
    ]
)

And I had to change it to this:

@app.callback(
    Output(component_id='wl-plot', component_property='src'),
    Input(component_id='sol-select', component_property='value'),
    Input(component_id='button-apply', component_property='n_clicks'),
    State(component_id='base-dir', component_property='value'),
)

So, basically, now you only have a list of Output, Input and State instances and you don need the state=....