> ## 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

export const GCell = ({children, className}) => <div className={`grid-table-cell ${className || ""}`} role="cell">
    {children}
  </div>;

export const GTH = ({children, className}) => <div className={`grid-table-th ${className || ""}`} role="columnheader">
    {children}
  </div>;

export const GRow = ({children}) => <div className="grid-table-row" role="row">{children}</div>;

export const GBody = ({children}) => <div className="grid-table-body" role="rowgroup">{children}</div>;

export const GHead = ({children}) => <div className="grid-table-head" role="rowgroup">{children}</div>;

export const GTable = ({children, className, cols}) => <div className={`grid-table not-prose overflow-hidden rounded-2xl ${className || ""}`} style={{
  "--grid-table-cols": cols
}} role="table">
    {children}
  </div>;

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
  ```
</Warning>

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:

<GTable cols="30% 70%">
  <GHead>
    <GRow>
      <GTH>Parameter</GTH>
      <GTH>Description</GTH>
    </GRow>
  </GHead>

  <GBody>
    <GRow>
      <GCell>`display_throughput`</GCell>
      <GCell>Show a speed dial next to the response. Default is False</GCell>
    </GRow>

    <GRow>
      <GCell>`system_message`</GCell>
      <GCell>Default system message applied to all responses</GCell>
    </GRow>

    <GRow>
      <GCell>`client_options`</GCell>
      <GCell>Optional dict passed as keyword arguments to `chat.completions.create`</GCell>
    </GRow>

    <GRow>
      <GCell>`extra_options`</GCell>
      <GCell>Optional dict for server configuration options</GCell>
    </GRow>
  </GBody>
</GTable>

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