ungzs (@user135) 在 github models worker 中发帖
我自己的号也被扬了一个
[image]
用 cursor 撸了一个 worker 代码
功能:
借助 KV, 直接进行迭代轮询
支持 流/非流
转发 tools 等
// 定义GitHub模型的端点
const ENDPOINT = 'https://models.inference.ai.azure.com';
const SUPPORTED_MODELS = ['gpt-4o', 'gpt-4o-mini'];
// 硬编码的固定token
const AUTH_TOKEN = 'sk-*'; // 请替换为您想要的16字符token
// 添加用户名和密钥的映射
const USER_API_KEYS = {
"user_name": "ghp_..."
};
// 硬编码的API密钥列表
const API_KEYS = Object.values(...