θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content

Conversation

@timothycarambat
Copy link
Member

Pull Request Type

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ”¨ chore
  • πŸ“ docs

Relevant Issues

resolves #617

What is in this change?

Resolve special env keys that are not updated by the app, but are specially set by the user so that reloading the container does not remove them.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

@timothycarambat timothycarambat merged commit 44eb1e9 into master Jan 19, 2024
@timothycarambat timothycarambat deleted the 617-persist-special-env-keys branch January 19, 2024 02:13
@review-agent-prime
Copy link

server/endpoints/utils.js

Instead of accessing the properties of message object multiple times, you can use destructuring assignment to unpack properties from the message object into distinct variables. This makes the code cleaner and easier to read.
Create Issue
See the diff
Checkout the fix

    for (const workspaceChats of Object.values(workspaceChatsMap)) {
      for (const {role, content} of workspaceChats.messages) {
        const escapedContent = `"${content.replace(/"/g, '""').replace(/\n/g, " ")}"`;
        rows.push(`${role},${escapedContent}`);
      }
    }
git fetch origin && git checkout -b ReviewBot/Impro-qcb0at6 origin/ReviewBot/Impro-qcb0at6

Instead of using concat.apply(), it's more efficient to use Array.prototype.flat(). This is because concat.apply() creates a new array every time it's used, while flat() only creates a new array once.
Create Issue
See the diff
Checkout the fix

    const allMessages = Object.values(workspaceChatsMap)
      .map((workspace) => workspace.messages)
      .flat();
git fetch origin && git checkout -b ReviewBot/Impro-6bacgkz origin/ReviewBot/Impro-6bacgkz

cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
* add support for exporting to json and csv in workspace chats

* safety encode URL options

* remove message about openai fine tuning on export success

* all defaults to jsonl

* Persist special env keys on updates

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
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

Successfully merging this pull request may close these issues.

Bug: Manual Entries in environment file (.env) overwritten/removed by GUI settings changes

3 participants