Skip to content

Commit 9cfc3f6

Browse files
author
Brian Genisio
committed
update readme to track features we've added
1 parent 03f0134 commit 9cfc3f6

File tree

3 files changed

+88
-0
lines changed

3 files changed

+88
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
</h1>
88
</p>
99

10+
<p>
11+
This is a fork of <a href="https://github.com/danny-avila/LibreChat">LibreChat</a> 0.7.8 with modifications added to support use in our environment. If you re-base to a new version, be sure to check that all these features still work.
12+
13+
<ul>
14+
<li><strong>Automatic login</strong> -- via DEFAULT_LOGIN_USER and DEFAULT_LOGIN_PASSWORD .env variables</li>
15+
<li><strong>Set env variables via rest</strong> -- via /api/config/env</li>
16+
<li><strong>Create a new chat with an initial message</strong> -- via /c/new?initialMessage=Hello</li>
17+
<li><strong>Create a new chat with a preset</strong> -- via /c/new?usePresetId=ABC-123-123ABC</li>
18+
</ul>
19+
</p>
20+
1021
<p align="center">
1122
<a href="https://discord.librechat.ai">
1223
<img

create-preset.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
const fs = require('fs');
2+
const preset = JSON.parse(fs.readFileSync('preset.json', 'utf8'));
3+
4+
const getJWT = async () => {
5+
try {
6+
const response = await fetch('http://localhost:3090/api/auth/login', {
7+
method: 'POST',
8+
headers: {
9+
'Content-Type': 'application/json',
10+
},
11+
body: JSON.stringify({
12+
13+
password: 'W3LoveCosmo'
14+
})
15+
});
16+
17+
if (!response.ok) {
18+
throw new Error(`HTTP error! status: ${response.status}`);
19+
}
20+
21+
const data = await response.json();
22+
return data.token;
23+
} catch (error) {
24+
console.error('Error getting JWT:', error);
25+
throw error;
26+
}
27+
};
28+
29+
const createPreset = async () => {
30+
const jwt = await getJWT();
31+
try {
32+
const response = await fetch('http://localhost:3090/api/presets', {
33+
method: 'POST',
34+
headers: {
35+
'Content-Type': 'application/json',
36+
'Authorization': `Bearer ${jwt}`
37+
},
38+
body: JSON.stringify(preset)
39+
});
40+
41+
if (!response.ok) {
42+
throw new Error(`HTTP error! status: ${response.status}`);
43+
}
44+
45+
const data = await response.json();
46+
console.log(data?.presetId ?? "");
47+
} catch (error) {
48+
console.error('Error creating preset:', error);
49+
throw error;
50+
}
51+
};
52+
53+
createPreset();
54+
55+
56+

preset.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"agentOptions": null,
3+
"defaultPreset": true,
4+
"endpoint": "bedrock",
5+
"isArchived": false,
6+
"maxContextTokens": 444,
7+
"maxTokens": 8192,
8+
"model": "us.anthropic.claude-3-7-sonnet-20250219-v1:0",
9+
"modelLabel": "Foobie",
10+
"order": 0,
11+
"region": "us-east-2",
12+
"resendFiles": true,
13+
"system": "Your name is Foobie and you are an international man of mystery. You always end your responses with your catchphrase: \"Foobie out!\"",
14+
"tags": [],
15+
"temperature": 0.53,
16+
"thinking": true,
17+
"thinkingBudget": 2000,
18+
"title": "Foobie2",
19+
"topK": 146,
20+
"topP": 0.72
21+
}

0 commit comments

Comments
 (0)