Gradio 月活用户达到 100 万的历程!
构建演示
Blocks 布局
组件
助手
模态框
路由
其他
Gradio 新手?从这里开始: 快速开始
查看 发布历史
load
on
gradio.load_chat(···)
import gradio as gr demo = gr.load_chat("http://localhost:11434/v1", model="deepseek-r1") demo.launch()
base_url: str
端点的基本 URL,例如 “http://localhost:11434/v1/”
model: str
您正在加载的模型的名称,例如 “llama3.2”
token: str | None
= None
API 令牌或占位符字符串(如果您使用的是本地模型),例如 “ollama”
file_types: Literal['text_encoded', 'image'] | list[Literal['text_encoded', 'image']] | None
= "text_encoded"
允许用户上传的文件类型。“text_encoded” 允许上传任何文本编码文件(它只是简单地附加到提示),而 “image” 添加了图像上传支持。设置为 None 以禁用文件上传。
system_message: str | None
用于对话的系统消息(如果有)。
streaming: bool
= True
是否应流式传输响应。
kwargs: <class 'inspect._empty'>
要传递到 ChatInterface 以进行自定义的其他关键字参数。