Zhiqiang Li

Results 5 issues of Zhiqiang Li

大家好,我们想收集一下使用了CanalSharp的用户,如果可以,请您留下你的公司名字,最好能带Logo,我们将收集并展示在Readme中。

document

今天自己在搞QQ登录,反编译了Microsoft.AspNetCore.Authentication.Google这个组件,来看看怎么写的,准备在github寻找其他实现qq登录组件中的AuthorizationEndpoint ,TokenEndpoint 等信息,发现了这个项目很不错,可以不用自己去造轮子了,赞一个。

改了下代码支持 Azure OpenAI ,只改了请求的 url 拼接和 header,没有动其他逻辑。 我对比了 OpenAI 和 Azure OpenAI 响应的数据格式是一致的,但是为什么无法自动 Stop 呢。 Azure 响应: ```` data: {"id":"chatcmpl-6xGsJBcDHMv8KUJDuk14JV32ZL3BZ","object":"chat.completion.chunk","created":1679584239,"model":"gpt-35-turbo","choices":[{"index":0,"finish_reason":null,"delta":{"role":"assistant"}}],"usage":null} data: {"id":"chatcmpl-6xGsJBcDHMv8KUJDuk14JV32ZL3BZ","object":"chat.completion.chunk","created":1679584239,"model":"gpt-35-turbo","choices":[{"index":0,"finish_reason":null,"delta":{"content":"你"}}],"usage":null} data: {"id":"chatcmpl-6xGsJBcDHMv8KUJDuk14JV32ZL3BZ","object":"chat.completion.chunk","created":1679584239,"model":"gpt-35-turbo","choices":[{"index":0,"finish_reason":null,"delta":{"content":"好"}}],"usage":null} data: {"id":"chatcmpl-6xGsJBcDHMv8KUJDuk14JV32ZL3BZ","object":"chat.completion.chunk","created":1679584239,"model":"gpt-35-turbo","choices":[{"index":0,"finish_reason":null,"delta":{"content":"!"}}],"usage":null} data: {"id":"chatcmpl-6xGsJBcDHMv8KUJDuk14JV32ZL3BZ","object":"chat.completion.chunk","created":1679584239,"model":"gpt-35-turbo","choices":[{"index":0,"finish_reason":null,"delta":{"content":"有"}}],"usage":null} data: {"id":"chatcmpl-6xGsJBcDHMv8KUJDuk14JV32ZL3BZ","object":"chat.completion.chunk","created":1679584239,"model":"gpt-35-turbo","choices":[{"index":0,"finish_reason":null,"delta":{"content":"什"}}],"usage":null}...

项目所用的 chatgpt-api(https://github.com/transitive-bullshit/chatgpt-api) 目前还不支持 Azure OpenAI(aoai)。 因为 Azure OpenAI 在请求 Url 和 Auth Key 上是不一致的,没法直接兼容。 我尝试修改了 chatgpt-web 的 fetch options,在里面兼容 azure 的 url 和 header,但是出现了对话无法自动结束的问题:[#831](https://github.com/Chanzhaoyu/chatgpt-web/issues/831) 跟了下代码,是 chatgpt-api 所用的 eventsource-parser 和 aoai...