Giter VIP home page Giter VIP logo

Comments (6)

sensite avatar sensite commented on August 18, 2024

另外,前端在显示提示错误时,会显示400、405这类的错误代码,为什么不显示可读性的文本?
反倒需要通过F12才可以看到错误消息文本。
把给用户看的有可读性的错误消息,隐藏起来了。在聊天对话框中,却显示为程序员看的HTTP状态码。

from ai-beehive.

hncboy avatar hncboy commented on August 18, 2024

为什么要限制对话的消息的总长度呢? 1、经常由于聊天历史记录太长,导致提示:父级消息不存在,本次对话出错,请先关闭上下文或开启新的对话窗口 2、如何调整为,不限制历史消息的总长度? 数据库查询索引: 1、另外,chat_message(原表名)中没有增加索引,查询父级消息时不会非常慢吗? 2、我已手动添加索引。

消息总长度
1.openai 接口限制了最大 tokens
2.可以调整每次携带的上下文,比如只携带最近的几条上下文。

数据库索引
chat_message 表目前这边还没遇到过比较慢情况,可能表数据量不多吧,目前几十万数据测试,有需要的话可以自己加索引。

from ai-beehive.

hncboy avatar hncboy commented on August 18, 2024

另外,前端在显示提示错误时,会显示400、405这类的错误代码,为什么不显示可读性的文本? 反倒需要通过F12才可以看到错误消息文本。 把给用户看的有可读性的错误消息,隐藏起来了。在聊天对话框中,却显示为程序员看的HTTP状态码。

这块 1.x 版本没有做处理,也可以做处理的。在 2.x 版本做了处理,有需要的话可以参考下。

from ai-beehive.

sensite avatar sensite commented on August 18, 2024

感谢!

from ai-beehive.

sensite avatar sensite commented on August 18, 2024

消息总长度
1.openai 接口限制了最大 tokens
2.可以调整每次携带的上下文,比如只携带最近的几条上下文。

目前旧版的系统中,默认携带几条上下文?会话中的所有聊天记录吗?:)

from ai-beehive.

hncboy avatar hncboy commented on August 18, 2024

消息总长度 1.openai 接口限制了最大 tokens 2.可以调整每次携带的上下文,比如只携带最近的几条上下文。

目前旧版的系统中,默认携带几条上下文?会话中的所有聊天记录吗?:)

默认携带所有上下文记录。

from ai-beehive.

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.