> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Panel

Use Panel's [ChatInterface](https://panel.holoviz.org/reference/chat/ChatInterface.html) callback to build a chatbot that uses one of Anaconda's models by serving it through the SDK.

> [!WARNING]
>
> The `ChatInterface` callback requires `panel`, `httpx`, and `numpy` to be installed in your environment:
>
> ```sh theme={null}
>     conda install panel httpx numpy
> ```

Here's an example Panel chatbot application:

```py theme={null}
import panel as pn
from anaconda_ai.integrations.panel import AnacondaModelHandler

pn.extension('echarts', 'tabulator', 'terminal')

llm = AnacondaModelHandler(
    'TinyLlama/TinyLlama-1.1B-Chat-v1.0_Q4_K_M.gguf', 
    display_throughput=True,
    extra_options={'ctx_size': 2048, 'temp': 0.7}
)

chat = pn.chat.ChatInterface(
    callback=llm.callback,
    show_button_name=False)

chat.send(
    "I am your assistant. How can I help you?",
    user=llm.model_id, avatar=llm.avatar, respond=False
)
chat.servable()
```

`AnacondaModelHandler` supports the following keyword arguments:

Parameter

Description

`display_throughput`

Show a speed dial next to the response. Default is False

`system_message`

Default system message applied to all responses

`client_options`

Optional dict passed as keyword arguments to `chat.completions.create`

`extra_options`

Optional dict for server configuration options

For more information on using Panel, see the [official documentation](https://panel.holoviz.org/reference/chat/ChatInterface.html).
