MCPcopy
hub / github.com/Akegarasu/ChatGLM-webui

github.com/Akegarasu/ChatGLM-webui @main sqlite

repository ↗ · DeepWiki ↗
37 symbols 110 edges 7 files 0 documented · 0%
README

ChatGLM-webui

A webui for ChatGLM made by THUDM. chatglm-6b

image

Features

  • Original Chat like chatglm-6b's demo, but use Gradio Chatbox for better user experience.
  • One click install script (but you still must install python)
  • More parameters that can be freely adjusted
  • Convenient save/load dialog history, presets
  • Custom maximum context length
  • Save to Markdown
  • Use program arguments to specify model and caculation accuracy

Install

requirements

python3.10

pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
pip install --upgrade -r requirements.txt

or

bash install.sh

Run

python webui.py

Arguments

--model-path: specify model path. If this parameter is not specified manually, the default value is THUDM/chatglm-6b. Transformers will automatically download model from huggingface.

--listen: launch gradio with 0.0.0.0 as server name, allowing to respond to network requests

--port: webui port

--share: use gradio to share

--precision: fp32(CPU only), fp16, int4(CUDA GPU only), int8(CUDA GPU only)

--cpu: use cpu

--path-prefix: url root path. If this parameter is not specified manually, the default value is /. Using a path prefix of /foo/bar enables ChatGLM-webui to serve from http://$ip:$port/foo/bar/ rather than http://$ip:$port/.

Core symbols most depended-on inside this repo

parse_codeblock
called by 3
modules/context.py
gradioApp
called by 3
scripts/main.js
get_cuda_device
called by 2
modules/device.py
executeCallbacks
called by 2
scripts/main.js
ensure_output_dirs
called by 1
webui.py
check_and_create
called by 1
webui.py
init
called by 1
webui.py
wait_on_server
called by 1
webui.py

Shape

Function 26
Method 10
Class 1

Languages

Python81%
TypeScript19%

Modules by API surface

modules/context.py12 symbols
scripts/main.js7 symbols
modules/ui.py7 symbols
webui.py5 symbols
modules/model.py3 symbols
modules/device.py3 symbols

Dependencies from manifests, versioned

gradio3.21.0 · 1×
protobuf3.19.5 · 1×
transformers4.26.1 · 1×

For agents

$ claude mcp add ChatGLM-webui \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact