Skip to content

Allow in-place Chat history editing #86

Description

@ncoghlan

lmstudio-js supports in-place Chat history editing via:

  • offering both mutable and immutable chat history and chat message instances via an internal mutability flag (using the MaybeMutable base class)
  • the .replaceText() method on saved messages (there are also .appendFile() and appendText() methods on messages)
  • the .replaceSystemPrompt() method to remove all previously added system prompt messages and insert the given prompt at the start of the chat history
  • the .filterInPlace() method to process all currently saved messages with the given filtering callback
  • the .pop() method
  • supporting direct iteration over and indexed access to the messages saved in the chat history

The Python SDK should offer similar capabilities (although the exact spelling may differ).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions