Comments (29)
from one-api.
大家一般用 Docker 来部署,这个我感觉意义不大哈。
from one-api.
只有我用GO部署嘛 哈哈哈
from one-api.
Docker 的话主要是更新很方便,如果用 MySQL & Redis 的话,应该配合 Docker Compose 使用。
而 One API 里面需要设置环境变量的也主要就这两个。
from one-api.
目前还不是采用MYSQL吧,看了下是SQLite,有计划把微信公众号合并到这里嘛
from one-api.
from one-api.
这样的话,是不是少了个sql库,可以直接改成mysql
from one-api.
配置环境变量 SQL_DSN
就好,MySQL 是原本就支持的,不过未测试可能会有问题。
本项目基于我的模板项目 gin-template,对于 MySQL 的支持也是继承于该项目。
from one-api.
确实,启动之后可能是我的库5.7版本过低。报错
from one-api.
可以看一下报错信息吗?
from one-api.
CREATE TABLE tokens
(id
bigint AUTO_INCREMENT,user_id
bigint,key
longtext,status
bigint DEFAULT 1,name
varchar(191),created_time
bigint,accessed_time
bigint,expired_time
bigint DEFAULT -1,remain_times
bigint DEFAULT 0,unlimited_times
boolean DEFAULT false,PRIMARY KEY (id
),INDEX idx_tokens_name
(name
),UNIQUE INDEX idx_tokens_key
(key
))
[FATAL] 2023/04/26 - 14:19:54 | [Error 1170: BLOB/TEXT column 'key' used in key specification without a key length]
from one-api.
Okay,有时间处理一下这个问题。
from one-api.
辛苦
from one-api.
已修复,版本 v0.1.6-alpha
已推送,期待反馈。
from one-api.
目前问题:渠道和令牌表id没有自增,会报错,记得改下
from one-api.
可以看一下报错信息吗?我现在没有 MySQL 环境可以测试。
from one-api.
from one-api.
我记得另一个项目里是可以自动递增的,不然主键冲突肯定会报错的。
我回去之后有了 MySQL 环境后再测试一下。
from one-api.
目前普通用户可以自己创建令牌,但是超级管理员应该可以查看到普通用户创建的令牌。(目前管理员仅能看到自己)
逻辑应该是普通用户仅有创建令牌的功能,但是没有权限进行设置次数和到期时间,这两个应该交给管理员来控制
from one-api.
普通用户没法设置次数的,需要使用兑换码,而兑换码只能管理员生成。
到期时间这个,感觉放开给用户无所谓。
from one-api.
不好意思刚刚页面没有刷新,应该卡bug了(刚刚普通用户居然可以输入次数,现在不可以了)
from one-api.
见 #9
from one-api.
应该是你刚刚登录了管理员账户,这个就算他能输入后端也不会给改的。
from one-api.
超级管理员应该可以查看到普通用户创建的令牌。(目前管理员仅能看到自己)
我觉得这点可以加上,超管支持查看所有的令牌
from one-api.
感觉管理员管理用户的令牌意义不大哈,如果用户有问题可以直接封禁用户的。
不过我突然意识到令牌校验时并没有检查用户的状态,导致用户被禁用后令牌还能用。
from one-api.
这个可以进行优化下
from one-api.
Okay,不过管理员管理用户令牌这个,应该单独开一个 issue,和当前 issue 主题关系不大不方便归档哈
from one-api.
目前问题:渠道和令牌表id没有自增,会报错,记得改下
MySQL 8.0.27
未能复现。
from one-api.
如果新版本依旧有问题,欢迎重开 issue。
from one-api.
Related Issues (20)
- 图片生成dall-e-3巨大Bug!引发size not supported for this image model
- 访问api/models接口404
- default用户可以调用到vip令牌 HOT 3
- 对接讯飞星火v3.5测试提示invalid auth
- 新注册提示验证码过期或者错误
- SYNC_FREQUENCY not set, Redis is disabled
- 希望可以代理Mathpix接口
- 使用vllm离线运行本地大模型,建立one-api渠道,显示测试无法接通。 HOT 2
- Gemini-1.5-pro出错 HOT 2
- 希望增加 gemini-1.0-ultra-latest 模型的支持 HOT 2
- UX小建议 - 本地缓存下渠道排序 HOT 3
- 阿里的模型,导入成功测试成功,怎么使用聊天啊,虚心求教 HOT 3
- 使用Redis后,用户余额缓存问题。
- LLM api response empty HOT 3
- 希望增加通过自定义模型名来轮询不同的国内AI服务商 HOT 5
- openai和claude的参数兼容 HOT 2
- 请支持阿里千文的FUNCTION调用 HOT 1
- 对接sunoapi HOT 1
- how to fix: react must be in scope when using JSX issue
- 为何对于 Claude 要默认带 max_tokens 参数? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from one-api.