openai-java
openai-java copied to clipboard
建议给completion增加context
通过https://api.openai.com/v1/conversations获取conversationId,然后每次发起对话时把conversationId传给completion。这样就能实现连续语境对话。
"Obtain the conversationId through https://api.openai.com/v1/conversations, and then pass the conversationId to completion every time a conversation is initiated. This enables continuous contextual dialogue."
Clever!
请问这个要怎么实现,我好像没找到有关这个接口的文档
不好意思,我搞错了。https://api.openai.com/v1/conversations 是chatGPT的接口。openai目前没开放这个接口
这个问题还是没解决
I did find a ShareGPT Chrome plugin.
https://techcrunch.com/2022/12/08/sharegpt-lets-you-easily-share-your-chatgpt-conversations/
It lets you create a link to any conversation. It does appear to use the conversations endpoint and what I assume is the conversation ID.
<meta itemProp="image" content="https://sharegpt.com/api/conversations/oPt72P3/og"/><meta property="og:logo" content="https://sharegpt.com/logo.png"/>
That might help in deconstructing a way to do it.
I did find a ShareGPT Chrome plugin. https://techcrunch.com/2022/12/08/sharegpt-lets-you-easily-share-your-chatgpt-conversations/
It lets you create a link to any conversation. It does appear to use the conversations endpoint and what I assume is the conversation ID.
<meta itemProp="image" content="https://sharegpt.com/api/conversations/oPt72P3/og"/><meta property="og:logo" content="https://sharegpt.com/logo.png"/>
That might help in deconstructing a way to do it.
Thank you for your help, but I checked the official api which doesn't seem to explain how to pass the conversationId
通过prompt将之前对话的所有信息全部提交即可实现会话功能
通过prompt将之前对话的所有信息全部提交即可实现会话功能
这样避免不了4000多个token限制的问题吧