Comments (14)
适配了,但是要改个 url
from go-chatgpt-api.
这样看的话其实是客户端要支持,因为这个 action 是传过来的,api 只是转发
from go-chatgpt-api.
是的,我用了 https://github.com/acheong08/ChatGPT/wiki/V1#ask 这个python库,里面有一个 auto_continue 参数,在获取长回复时很方便,但是需要相应 api 的支持才行
from go-chatgpt-api.
说的是一个请求返回所有是吧?
之前版本有,后面被我去掉了,当时是通过返回的 max token 还是啥判断的,但是测试的时候,部分提示词会永远返回 max token 导致返回了几分钟还在返回,我就去掉了,改为客户端自己处理
from go-chatgpt-api.
这个新的 action 需要再看看怎么弄,或者你弄个 PR?
from go-chatgpt-api.
是一个请求返回所有。我不懂go😂
from go-chatgpt-api.
用 py 写,叫 gpt 转成 go
from go-chatgpt-api.
是的,我用了 https://github.com/acheong08/ChatGPT/wiki/V1#ask 这个python库,里面有一个 auto_continue 参数,在获取长回复时很方便,但是需要相应 api 的支持才行
cid = line["conversation_id"]
pid = line["message"]["id"]
metadata = line["message"].get("metadata", {})
model = metadata.get("model_slug", None)
finish_details = metadata.get("finish_details", {"type": None})["type"]
if not (auto_continue and finish_details == "max_tokens"):
return
message = message.strip("\n")
async for i in self.continue_write(
conversation_id=cid,
timeout=timeout,
auto_continue=False,
):
i["message"] = message + i["message"]
yield i
看了一下源码,其实跟代理端关系可有可无(当然代理端实现就最方便了),实现方式就是判断finish_details == "max_tokens"
并且continue_write(),这个continue_write区别就是
"action": "continue",
"conversation_id": conversation_id,
"parent_message_id": parent_id,
"model": model
和
"action": "next",
"messages": messages,
"conversation_id": conversation_id,
"parent_message_id": parent_id,
"model": model
的区别,正常对话action为next并附带对话内容,而continue不需要附带内容,只需要"action": "continue"即可,之前@linweiyuan 大佬弄过,好像效果不好,估计就是没有使用"action": "continue"去做?
from go-chatgpt-api.
当初弄的时候,是魔改的,官方还没有这个参数
from go-chatgpt-api.
当初弄的时候,是魔改的,官方还没有这个参数
那你可以把代码回滚回来,稍加修改就可以支持该功能
from go-chatgpt-api.
当初是浏览器 JS 版本,不能直接回滚
from go-chatgpt-api.
是的,我用了 https://github.com/acheong08/ChatGPT/wiki/V1#ask 这个python库,里面有一个 auto_continue 参数,在获取长回复时很方便,但是需要相应 api 的支持才行
我也用的这个python库,auto_continue一直都是用默认False,更新go-chatgpt-api后似乎全部都变为自动继续了?
from go-chatgpt-api.
那么需要再加个适配
from go-chatgpt-api.
麻烦大佬加个适配吧🙏,因为这个自动继续,现在python库里的rollback_conversation好像都不能用了。
from go-chatgpt-api.
Related Issues (20)
- go-chatgpt-api 不向 ARKOSE_TOKEN_URL 发送请求就返回 Failed to get arkose token. HOT 1
- 可以在docker-compose里使用账号密码组来让他自动获取token吗? HOT 2
- chatgpt-proxy-server-warp 这个源代码为啥隐藏? HOT 6
- 和潘多拉联动的话,key还需要吗? HOT 2
- failed to start HOT 10
- refreshPuidErrorMessage HOT 2
- Post "https://chat.openai.com/backend-api/conversation": unexpected EOF HOT 1
- platform/login err HOT 7
- 更新了最新的镜像版本,还是报错nil和403 HOT 6
- 登录获取access token似乎还是有问题 HOT 2
- Latest Image does not locate .har file HOT 1
- 不支持vercel吗 HOT 1
- 大神回复真快 HOT 10
- 这个怎么使用,我点了render按钮。部署成功后返回service go-chatgpt-api is ready信息。 HOT 1
- 最新版镜像报错422,"none is not an allowed value" HOT 1
- 提问后拿不到结果 HOT 4
- chatgpt login err HOT 10
- tcr9i.chat.openai.com connect: connection timed out HOT 8
- AccessToken 和 模拟 apiKey 下的报错问题 HOT 3
- 如何模拟 https://api.openai.com/v1/models接口呢 HOT 2
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 go-chatgpt-api.