GithubHelp home page GithubHelp logo

上下文记忆 about ex-chatgpt HOT 6 CLOSED

circlestarzero avatar circlestarzero commented on July 20, 2024
上下文记忆

from ex-chatgpt.

Comments (6)

ProblemFactory avatar ProblemFactory commented on July 20, 2024

看起来是这个样子的。我觉得可以在每次prompt里插入之前的对话历史来保留上下文能力。

from ex-chatgpt.

CALMCRAZY avatar CALMCRAZY commented on July 20, 2024

看起来是这个样子的。我觉得可以在每次prompt里插入之前的对话历史来保留上下文能力。

确实,看别人调用gpt-3.5-turbo API的demo也是这么做的。但模型最多处理4096 token,包括输入和输出,这个项目里光是引导chatgpt调用API的prompt已经占用了很多token了,再插入对话历史留给输出的token就寥寥无几了

from ex-chatgpt.

JamesFlare1212 avatar JamesFlare1212 commented on July 20, 2024

一种办法是超出token之后把前面的对话概括后再发送,不过这样API燃烧地很快吧。

from ex-chatgpt.

circlestarzero avatar circlestarzero commented on July 20, 2024

84B0063BBD491FB5DC75F4E0A331E72C

from ex-chatgpt.

circlestarzero avatar circlestarzero commented on July 20, 2024

这个问题解决了

from ex-chatgpt.

circlestarzero avatar circlestarzero commented on July 20, 2024

看起来是这个样子的。我觉得可以在每次prompt里插入之前的对话历史来保留上下文能力。

是的,已经这样实现了

from ex-chatgpt.

Related Issues (20)

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.