Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问有messages为什么还要带conversation history? #77

Open
van1129 opened this issue Nov 30, 2023 · 1 comment
Open

请问有messages为什么还要带conversation history? #77

van1129 opened this issue Nov 30, 2023 · 1 comment

Comments

@van1129
Copy link

van1129 commented Nov 30, 2023

在向大模型发送messages请求的时候,会带有历史聊天记录,为什么还需要在prompt里带上conversation history呢?

@van1129 van1129 changed the title 请问有message为什么还要带conversation history? 请问有messages为什么还要带conversation history? Nov 30, 2023
@ZuzooVn
Copy link

ZuzooVn commented Jan 28, 2024

@van1129 LLMs function in a stateless manner, meaning they don't have built-in mechanisms to retain information across interactions. Each query is processed independently, without considering the context of previous exchanges.

In the case of the OpenAI ChatGPT GUI/ Poe GUI, there is a truncation algorithm running in the background. It attempts to determine the relevant information from previous messages that should be included as a prompt for the new chat.

However, when using the OpenAI GPT API, implementing contextual conversation from scratch is necessary. This means managing and passing the conversation history explicitly to maintain context between messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants