Chatbot quickstart
The fastest way to get a working chatbot is from the Databricks console, using their selection of templates. Requires a pre-configured model serving endpoint.
- From the console of your databricks instance, select
New > Appfrom the sidebar. (For future reference, Apps are under the Compute tab at the time of this writing:Compute > Apps) - Template should be pre-selected instead of Custom.
- Choose a framework from the tabs below; I’m going to recommend Gradio.
- Choose Chatbot, then Next
Configuration screen:
- Add a name
- Advanced Settings should already be open
- Select a model-serving endpoint
- Create and deploy
In a few minutes, you can use a basic chatbot interface via Databricks Apps. They really made it easy on us! It can be accessed by anyone who can log into your Databricks instance.
From there, you can use the generated commands on the Apps detail page to copy the code into your local editor, or start editing within the Databricks filesystem.
Local development
There are 2 main CLI commands for local development:
databricks sync . /Workspace/<REST_OF_DATABRICKS_URI>/ This syncs your local code to the URI within your Databricks instance. Find this pre-populated in the page for your App.
databricks apps deploy <YOUR_APP_NAME>This triggers a deployment of your App. It will deploy code from Databricks, not locally.
If you have doubts about the code’s location in Databricks, you can get configuration about a specific app using: databricks apps get <APP_NAME> or databricks apps list for all of yours.
For more information, see the Databricks Apps documentation.