Coder Social home page Coder Social logo

Comments (5)

qingfusheng avatar qingfusheng commented on August 24, 2024

也不能说是API的通病吧,因为GPT3的那个模型(比如达芬奇的那个模型),使用的时候好像都是,“Human:~~~.AI:~~~.Human:~~~.AI:~~~.”的方式,就是你在调用接口的时候需要把前面的聊天记录都post上去,这样模型才能够通过上下文环境理解。
代码示例:
image

效果就像这样:
QQ截图20230218230628

from chatgpt-web.

qingfusheng avatar qingfusheng commented on August 24, 2024

我曾经也考虑过将这个加入到接口中,但是这样的话必须要考虑text的创建时机和销毁时机(我觉得应该跟前端有关,就像是你在刷新页面的时候将聊天信息清除的同时也将text重新置为0,有点类似于缓存的创建时机和销毁时机的问题),因为我对前端不是很了解,所以没有想到比较好的处理方法。但是我觉得存储上下文信息的这个function必须要放到前端(而且必要时还是限制token大小吧,不然随着聊天,text会越来越大)。

from chatgpt-web.

qingfusheng avatar qingfusheng commented on August 24, 2024

要限制text的大小,因为GPT3的接口并不是免费的。

from chatgpt-web.

18y avatar 18y commented on August 24, 2024

感谢回复~,现在的收费方式我有点迷

from chatgpt-web.

mic1on avatar mic1on commented on August 24, 2024

解决连续对话

from chatgpt-web.

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.