这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@shatfield4
Copy link
Collaborator

@shatfield4 shatfield4 commented Nov 7, 2023

resolves #341

Adding the ability to export all chats from all workspaces to JSONL format so these can be used in OpenAI fine tuning models.

@shatfield4 shatfield4 linked an issue Nov 7, 2023 that may be closed by this pull request
@shatfield4 shatfield4 self-assigned this Nov 7, 2023
@review-agent-prime
Copy link

frontend/src/models/admin.js

It's a good practice to not expose the actual error message to the client. Instead, log the error message and send a generic error message to the client. This prevents potential attackers from gaining insights into the internal workings of your application.
Create Issue

    .catch((e) => {
+      console.error(e);
+      return { success: false, error: 'An error occurred while processing your request.' };
-      return null;
    });

It's a good practice to use meaningful variable names. This makes the code easier to read and understand. In this case, 'e' could be replaced with 'error'.
Create Issue

    .catch((error) => {
+      console.error(error);
+      return { success: false, error: 'An error occurred while processing your request.' };
    });

server/endpoints/admin.js

It's a good practice to not expose the actual error message to the client. Instead, log the error message and send a generic error message to the client. This prevents potential attackers from gaining insights into the internal workings of your application.
Create Issue

    } catch (e) {
+      console.error(e);
+      response.status(500).json({ error: 'An error occurred while processing your request.' }).end();
-      response.sendStatus(500).end();
    }

It's a good practice to use meaningful variable names. This makes the code easier to read and understand. In this case, 'e' could be replaced with 'error'.
Create Issue

    } catch (error) {
+      console.error(error);
+      response.status(500).json({ error: 'An error occurred while processing your request.' }).end();
    }

Change sidebar position and permission
Remove check for MUM
@timothycarambat timothycarambat merged commit 997482e into master Nov 9, 2023
@timothycarambat timothycarambat deleted the 341-export-chat-history-as-jsonl branch November 9, 2023 01:36
cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
* added JSONL export to workspace chats

* change permissions for workspace chat settings

* change permissions for workspace chat settings

* Show error for correct limit on fine-tune
Change sidebar position and permission
Remove check for MUM

---------

Co-authored-by: timothycarambat <rambat1010@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.

Export chat history as JSONL

3 participants