Skip to main content

url_shape

Function url_shape 

Source
pub fn url_shape(url: &Url) -> String
Expand description

网址的“形状”:同一模板生成的页面(/item/123、/item/456)形状相同。路径段全是数字的写成 {n},含数字的写成 {id},其余照原样;查询串只留参数名(排序)。结构化抽取缓存 LLM 生成的 schema 时用它作键的一部分(0.97)。