选项

name
str
默认值:"我的聊天机器人"

应用程序和聊天机器人的名称。

description
str

应用程序的 <meta name="description"> 的内容。

cot
Literal['hidden', 'tool_call', 'full']
默认值:"full"

思维链 (COT) 是一项功能,用于向用户展示聊天机器人得出结论所采取的步骤。您可以隐藏 COT,仅显示工具调用,或完整显示。

default_collapse_content
bool
默认值:true

处理大量文本内容时,我们会将其折叠起来以保持对话简洁。您可以手动禁用此行为。

default_expand_message
bool
默认值:false

子消息默认隐藏,您可以“展开”父消息以显示这些消息。切换此设置将默认显示子消息。

github
str

传递此选项将显示一个 Github 形状的链接。如果未传递,我们将显示 Chainlit 仓库的链接。

默认配置

[UI]
# Name of the app and chatbot.
name = "Chatbot"

# Description of the app and chatbot. This is used for HTML tags.
# description = ""

# Large size content are by default collapsed for a cleaner ui
default_collapse_content = true

# The default value for the expand messages settings.
default_expand_messages = false

# Chain of Thought (CoT) display mode. Can be "hidden", "tool_call" or "full".
cot = "full"

# Link to your github repo. This will add a github button in the UI's header.
# github = ""

# Specify a CSS file that can be used to customize the user interface.
# The CSS file can be served from the public directory or via an external link.
# custom_css = "/public/test.css"

[UI.theme]
  #layout = "wide"
  #font_family = "Inter, sans-serif"
  # Override default MUI light theme. (Check theme.ts)
  [UI.theme.light]
      #background = "#FAFAFA"
      #paper = "#FFFFFF"

      [UI.theme.light.primary]
          #main = "#F80061"
          #dark = "#980039"
          #light = "#FFE7EB"

  # Override default MUI dark theme. (Check theme.ts)
  [UI.theme.dark]
      #background = "#FAFAFA"
      #paper = "#FFFFFF"

      [UI.theme.dark.primary]
          #main = "#F80061"
          #dark = "#980039"
          #light = "#FFE7EB"