Giter Site home page Giter Site logo

jianjianai / newbinggogo-web Goto Github PK

View Code? Open in Web Editor NEW
759.0 759.0 575.0 1.29 MB

一个基于微软OpenAI ChatGPT GPT4的New Bing接口的Web服务。 提供了好看的对话页面。 实现了微软New Bing的大多数功能,还添加了一些自己的特色功能。 开源免费。

License: GNU Affero General Public License v3.0

Shell 0.01% Java 19.89% HTML 2.00% CSS 8.18% JavaScript 69.90% Dockerfile 0.02%

newbinggogo-web's Introduction

常用的编程语言

newbinggogo-web's People

Contributors

jianjianai avatar lwd-temp avatar macvip avatar sffxzzp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

newbinggogo-web's Issues

通过jar包运行,为啥会报重定向太多

服务器内部发生未知错误!详情:java.net.ProtocolException: Server redirected too many times (20) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2005) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:529) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:308) at cn.jja8.newbinggogo.NewBingGoGoServer.goUrl(NewBingGoGoServer.java:268) at cn.jja8.newbinggogo.NewBingGoGoServer.goUrl(NewBingGoGoServer.java:183) at cn.jja8.newbinggogo.NewBingGoGoServer.serveHttp(NewBingGoGoServer.java:60) at fi.iki.elonen.NanoWSD.serve(NanoWSD.java:862) at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:901) at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:148) at java.base/java.lang.Thread.run(Thread.java:833)

Bug报告:项目内文字是否需要精确化?

例:

一个基于微软ChatGPT GPT4的NewBing接口的web服务 -> 一个基于微软New Bing接口的Web服务

微软ChatGPT GPT4这个描述似乎不对应任何一个产品,我们直接调用的是New Bing,至于New Bing到底基于什么似乎没必要提及?或者基于微软ChatGPT GPT4的NewBing接口 -> 基于OpenAI GPT4的New Bing接口?)

(下面的是根据官方商标/说明文字的修改)

NewBing -> New Bing

edge浏览器 -> Edge浏览器

bing -> Bing

初次使用,想问大佬一些问题

我是在机顶盒上安装了Java,运行此jar包,开了v2rayA。
image

问题一
使用中会出现网络问题,大佬知道v2rayA该怎么配置吗?
Snipaste_2023-05-26_16-03-28

问题二
画图的时候,提示这个,该怎么解决?
Snipaste_2023-05-26_16-04-49

连接发生错误:[object Event] 聊天异常中断了!可能是网络问题。

WebSocket connection to 'wss://私有化的部署域名(非cf的默认workers域名)/sydney/ChatHub' failed: 
sendMessage @ BingChating.js:56

部署在cf的worker上,尝试发送任何第一条消息后都会返回连接发生错误:[object Event] 聊天异常中断了!可能是网络问题。
然后在console中可以看到上述的报错
NewBingGoGo插件版运行正常
ps.我开启了access进行鉴权防止他人恶意利用我的cookies,我不确定是否会和这个有关

请问如何获取对话的文本内容?

我希望获取用户和newbing对话的文本内容以实现按字数限制ip频繁访问,关键词过滤等功能,
我尝试修改了Response goUrL以及WebWork类,但只获取了以下格式的数据
{"conversationId":"51D|BingProd|,"clientId":"","conversationSignature":"=","result":{"value":"Success","message":null}}

cloudflare workers部署后的后缀能否不增加跳转?

感谢作者的部署和配置,请问下,是否可以直接在页面做版权或其他部署,而不要在域名地址栏"workers domain**### /web/NewBingGoGo.html**"增加这个尾巴"/web/NewBingGoGo.html"做跳转,是否可以不设置?谢谢

java版本 cookies读取异常?按快速入门配置的

cookies:
...
- _U=1w7djTOUYWY2_bME6URBm5Jo.....
...

读取时出错!原因:java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.List (java.lang.String and java.util.List are in module java.base of loader 'bootstrap'

更多的导出聊天记录方法

使用github mobile发送 排版可能出现问题

类似

在上一次对话中我问了你这样一个问题:
xxx
你的回答是:
xxx
于是我又追问道:
xxx
而你给出的回答是:
xxx

引用

导出为txt 或者在新网页打开(为了给edge的侧栏用)

【非Bug】koishi插件编写时遇到困难 UnauthorizedRequest

非常抱歉打扰到大大们。

我想借用 NewBingGoGo 的 cloudflareWorker.js 服务端脚本来作为代理,而我在koishi插件实现酷似NewBingGoGo-Web的操作以此实现与newbing的聊天。

代码仓库地址:https://github.com/Mcayear/koishi-NewBingGoGo/blob/main/index.js

经过我的工作我探索到NewBingGoGo-Web与cloudflareWorker的工作流程:

Step 1 - 获取验证

  • 由Web向worker发起一个https请求

path:/turing/conversation/create
headers包含:new_bing_go_go-plug-create

返回如下

{
    "conversationId": "51D|BingProd|E64E1ED69F3C7A259DB80D9B746BEFEF3750D81DB5C5332748B1CB04A4F9FEF0",
    "clientId": "339C6F19301467C510617C0E31906652",
    "conversationSignature": "e+A4FXIQy,r2+AJyGxBWH6LtgfbXggTYOy4lTGEyx34E=",
    "result": {
        "value": "Success",
        "message": null
    }
}

Step 2 - 与Worker建立ws链接

发送

{
    "protocol": "json",
    "version": 1
}

Step 3 - 发送聊天信息并接收返回

发送

{
    "arguments": [
        {
            "source": "cib",
            "optionsSets": [
                "nlu_direct_response_filter",
                "deepleo",
                "disable_emoji_spoken_text",
                "responsible_ai_policy_235",
                "enablemm",
                "h3imaginative",
                "cricketansgnd",
                "cachewriteext",
                "e2ecachewrite",
                "nodlcpcwrite",
                "nointernalsugg",
                "saharasugg",
                "enablenewsfc",
                "dv3sugg",
                "clgalileo",
                "gencontentv3"
            ],
            "allowedMessageTypes": [
                "ActionRequest",
                "Chat",
                "Context",
                "InternalSearchQuery",
                "InternalSearchResult",
                "Disengaged",
                "InternalLoaderMessage",
                "Progress",
                "RenderCardRequest",
                "AdsQuery",
                "SemanticSerp",
                "GenerateContentQuery",
                "SearchQuery"
            ],
            "sliceIds": [
                "winmuid2tf",
                "sydconfigoptc",
                "forallv2nscpw",
                "allnopvt",
                "anssuptokenlist",
                "tempcacheread",
                "temptacache",
                "encjsreftf",
                "winlongmsgtf",
                "wrapnoins",
                "505iccric",
                "0430dv3s0",
                "505scsv5",
                "scprompt2",
                "508jbcar",
                "425bicb2",
                "406sportgnds0",
                "427startpm"
            ],
            "verbosity": "verbose",
            "traceId": "006532391ea24c2baf5baa8e02b4916a",
            "isStartOfSession": true,
            "message": {
                "locale": "zh-CN",
                "market": "zh-CN",
                "region": "US",
                "location": "lat:47.639557;long:-122.128159;re=1000m;",
                "locationHints": [
                    {
                        "Center": {
                            "Latitude": 30.474103707944767,
                            "Longitude": 114.39625306330366
                        },
                        "RegionType": 2,
                        "SourceType": 11
                    },
                    {
                        "country": "United States",
                        "state": "Washington",
                        "city": "Index",
                        "zipcode": "98256",
                        "timezoneoffset": -8,
                        "dma": 819,
                        "countryConfidence": 9,
                        "Center": {
                            "Latitude": 47.8201,
                            "Longitude": -121.5543
                        },
                        "RegionType": 2,
                        "SourceType": 1
                    }
                ],
                "timestamp": "2023-05-20T08:56:08+08:00",
                "author": "user",
                "inputMethod": "Keyboard",
                "text": "你好",
                "messageType": "Chat",
                "requestId": "536a6fe9-ff18-4fe8-b35d-fac007ed2c1d",
                "messageId": "536a6fe9-ff18-4fe8-b35d-fac007ed2c1d"
            },
            "tone": "Creative",
            "requestId": "536a6fe9-ff18-4fe8-b35d-fac007ed2c1d",
            "conversationSignature": "e+A4FXIQy,r2+AJyGxBWH6LtgfbXggTYOy4lTGEyx34E=",
            "participant": {
                "id": "339C6F19301467C510617C0E31906652"
            },
            "conversationId": "51D|BingProd|E64E1ED69F3C7A259DB80D9B746BEFEF3750D81DB5C5332748B1CB04A4F9FEF0"
        }
    ],
    "invocationId": "1",
    "target": "chat",
    "type": 4
}

接收:

{
	"type": 2,
	"invocationId": "1",
	"item": {
		"firstNewMessageIndex": null,
		"defaultChatName": null,
		"conversationId": "51D|BingProd|E64E1ED69F3C7A259DB80D9B746BEFEF3750D81DB5C5332748B1CB04A4F9FEF0",
		"requestId": "536a6fe9-ff18-4fe8-b35d-fac007ed2c1d",
		"telemetry": {
			"metrics": null,
			"startTime": "2023-05-20T00:56:08.0280732Z"
		},
		"result": {
			"value": "UnauthorizedRequest",
			"message": "Conversation signature verification failed. The signature was not the one that was expected.",
			"error": "UnauthorizedRequest",
			"renewCert": true,
			"serviceVersion": "20230519.42"
		}
	}
} {
	"type": 3,
	"invocationId": "1"
}

遇到的错误

在第三步的返回中可见 UnauthorizedRequest 错误。

我检查了第一步中的 conversationId、conversationSignature 与第三步中的 conversationId、conversationSignature 二者完全相同。

所用的代码仓库地址:https://github.com/Mcayear/koishi-NewBingGoGo/blob/main/index.js

Workers版本不工作是已知问题

/turing/conversation/create返回{"conversationId":"51D|BingProdUnAuthenticatedUsers|15B622DD41A13557B01D5C3A7707BAFA09DBBE083DCD2B7D031C461F4E781D7F","clientId":"985155485310705","conversationSignature":"rQZdWw/w9uCUUtm5Ywpd1DZRoO8HkOUFVXYXHI1MAjU=","result":{"value":"Success","message":null}},但/sydney/ChatHub没有回应。

我的Workers部署也发生此问题。

特性请求:实现NewBingGoGo扩展程序的其他功能 & 其他

注意到NewBingGoGo-Web目前还不支持保存、聊天记录、创作等功能。

期待在未来的更新中添加。

可以增加在Web页面上设置自己的Cookie的功能,类似提供API Key的方式。

聊天记录功能可以用localStorage或者IndexedDB实现。

发现微软的偏心行为

18786ad2a76dfa0aa928bbb65ca75f62
edge浏览器多给5次聊天机会。但是更新之后就不会有偏心了。因为不管什么浏览器统统伪装成edge。

报错:服务器内部发生未知错误!详情:java.net.ProtocolException

我在搭建好后随便问了一句就出现报错。

环境:

Windows10
java 18.0.2.1 2022-08-18
Java(TM) SE Runtime Environment (build 18.0.2.1+1-1)
Java HotSpot(TM) 64-Bit Server VM (build 18.0.2.1+1-1, mixed mode, sharing)

具体报错信息:

服务器内部发生未知错误!详情:java.net.ProtocolException: Server redirected too many times (20) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2005) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:529) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:308) at cn.jja8.newbinggogo.NewBingGoGoServer.goUrl(NewBingGoGoServer.java:236) at cn.jja8.newbinggogo.NewBingGoGoServer.goUrl(NewBingGoGoServer.java:155) at cn.jja8.newbinggogo.NewBingGoGoServer.serveHttp(NewBingGoGoServer.java:57) at fi.iki.elonen.NanoWSD.serve(NanoWSD.java:862) at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:901) at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:148) at java.base/java.lang.Thread.run(Thread.java:833)

详情如图

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.