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

Local server not remembering previous messages #2602

Open
Tracked by #11872
cebtenzzre opened this issue Jul 8, 2024 · 4 comments
Open
Tracked by #11872

Local server not remembering previous messages #2602

cebtenzzre opened this issue Jul 8, 2024 · 4 comments
Labels
bug-unconfirmed chat gpt4all-chat issues local-server Related to the Chat UI's built-in API server

Comments

@cebtenzzre
Copy link
Member

From this Discord message:

image

Possibly an issue with the way n_past is managed, or maybe the effective context length is too small? Or possibly we never even attempted to preserve message history for the server—I haven't looked at the code (or attempted to reproduce this issue, for that matter).

@cebtenzzre cebtenzzre added chat gpt4all-chat issues bug-unconfirmed labels Jul 8, 2024
@cosmic-snow
Copy link
Collaborator

I'm no expert on all the server internals, but there are two URLs (paths): /v1/completions and /v1/chat/completions. The former is for one-offs.

It's not clear from the screenshot which one was used.

@cosmic-snow
Copy link
Collaborator

Or possibly we never even attempted to preserve message history for the server

Now that I've spent some more time on it, I think it's supposed to be stateless, and when using the /v1/chat/completions path, the "messages": [] array is used to keep track of and reintroduce previous exchanges.

Although from what I've seen, I guess the local API server just concatenates these messages instead of handling them properly.

Useful/related:

@ThiloteE
Copy link
Collaborator

@cosmic-snow
do you see

// don't remember any context
resetContext();

in the code and is it relevant?

@cebtenzzre
Copy link
Member Author

This was fixed in #2929 (v3.3.0) but it was broken again by #3147 (v3.5.0) - oops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-unconfirmed chat gpt4all-chat issues local-server Related to the Chat UI's built-in API server
Projects
None yet
Development

No branches or pull requests

3 participants