📌 📄 内容摘要:
liaowen 在 一个脚本将你的 new-api 渠道配置转化为 uni-api 配置文件 中发帖
import sqlite3
providers = []
with sqlite3.connect('one-api.db') as conn:
cursor = conn.cursor()
# 获取所有channels并按照priority降序排序,优先级高的排在前面
all_channels = cursor.execute('SELECT name, key, base_url, models FROM channels ORDER BY priority DESC').fetchall()
for channel in all_channels:
provider = {
'provider': channel[0], # name作为provider
'base_ur...
────────── 链接信息 ──────────
🔗 论坛链接: linux.do
📎 访问地址: https://linux.do/t/topic/318661/1
─────────────────────────────
📢 来源:LINUX DO