Skip to content

关于GPT-3模型上下文对话 和 ChatGPT接入问题 #43

Closed
@zhayujie

Description

目前 GPT3模型中已经实现了会话上下文,只需要拉取最新代码即可生效。

同时新增了两个可选配置:

  • conversation_max_tokens:表示能够记忆的上下文最大字数(一问一答为一组对话,如果累积的对话字数超出限制,就会优先移除最早的一组对话)。 该配置默认为1000,不建议超过 2000,否则对话可能超长。
  • character_desc:配置中保存着你对机器人说的一段话,他会记住这段话并作为他的人格设定,你可以为他塑造任何形象

config.json 中的示例如下:

{
    "conversation_max_tokens": 1000,
    "character_desc": "你叫李华,是一个25岁的程序员,你性格活泼开朗,爱好登山"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions