💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
# 具体某接口的请求封装:api/index.js配置 > 引入上一章的get函数 ``` import { get } from './helpers' ``` > 定义具体访问的接口,注意,这些接口是已存在的,不是在这里定义的,这里仅仅是为了规范代码而进行的简单封装。 ``` const getSeller = get('api/seller') const getGoods = get('api/goods') const getRatings = get('api/ratings') ``` > 将所有封装输出 ``` export { getSeller, getGoods, getRatings } ```