nianhua99 / PandoraHelper

使用 PandoraHelper 轻松和你的小伙伴共享 ChatGPT Plus/Claude Pro 服务!
https://wiki.oai2b.com
MIT License
1.02k stars 156 forks source link

道德检查似乎不起效 #138

Open xixi-furry opened 4 days ago

xixi-furry commented 4 days ago

现在配置文件如下:

{
    "security": {
        "admin_password": "xxxxx"
    },
    "http": {
        "host": "0.0.0.0",
        "port": 9000,
        "proxy-pass": {
            "oaifree": {
                "enable": true,
                "host": "https://new.oaifree.com",
                "port": 9001
            },
            "fuclaude": {
                "enable": true,
                "host": "https://demo.fuclaude.com",
                "port": 9002
            }
        },
        "title": "小动物's AI",
        "rate": 1000
    },
    "database": {
        "driver": "mysql",
        "dsn": "pandora:xxxxxxxxxxx@tcp(172.17.0.1:3306)/pandora?charset=utf8mb4&parseTime=True&loc=Local"
    },
    "share": {
        "random": true,
        "custom": true
    },
    "pandora": {
        "domain": {
            "chat": "https://chat.oaifree.com",
            "token": "https://token.oaifree.com",
            "index": "https://chatgpt.domain.com",
            "claude": "https://demo.fuclaude.com"
        }
    },
    "moderation": {
        "apiKey": "sk-xxxxxxxxx",
        "apiUrl": "https://api.oaipro.com/v1/moderations",
        "message": "您的消息包含不当内容,请修改后重试!"
    },
    "oneapi": {
        "token": "",
        "domain": ""
    },
    "log": {
        "level": "info",
        "encoding": "console",
        "output": "console",
        "log_file_name": "./logs/server.log",
        "max_backups": 30,
        "max_age": 7,
        "max_size": 1024,
        "compress": true
    }
}

尝试输入敏感词后,直接提示这个: image

然后log里显示的是这个: image

然后在oneapi那边看确实有请求,不清楚是哪里的问题。是拦截成功了还是失败了

xixi-furry commented 4 days ago

不知道跟这一部分有没有关系: image 这个时候是docker刚启动,反向代理不通就一定是502,不知道该如何解决。

BlazarWinGX commented 3 days ago

使用cf反代上道德审核也有此问题,好像可以正常拦截,但不显示自定义信息。

nianhua99 commented 3 days ago

目前自带的反代是有bug,这两天会发一个新版

LemonZuo commented 3 days ago

oai那个返回消息格式也有调整

{
    "detail": {
        "message": "动词大次",
        "flagged": true
    }
}

目前测试这种能显示出来,年华佬冲