Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Thank you to all the contributors who have helped make this project possible! We

## Contributing Guidelines

If the feature you would like to contribute has not already received prior approval from the project maintainers (i.e., the feature is currently on the [roadmap](https://github.com/users/danny-avila/projects/2)), please submit a request in the [Feature Requests & Suggestions category](https://github.com/danny-avila/LibreChat/discussions/new?category=feature-requests-suggestions) of the discussions board before beginning work on it. The requests should include specific implementation details, including areas of the application that will be affected by the change (including designs if applicable), and any other relevant information that might be required for a speedy review. However, proposals are not required for small changes, bug fixes, or documentation improvements. Small changes and bug fixes should be tied to an [issue](https://github.com/danny-avila/LibreChat/issues) and included in the corresponding pull request for tracking purposes.
If the feature you would like to contribute has not already received prior approval from the project maintainers (i.e., the feature is currently on the [roadmap](https://github.com/users/enricai/projects/2)), please submit a request in the [Feature Requests & Suggestions category](https://github.com/enricai/LibreChat/discussions/new?category=feature-requests-suggestions) of the discussions board before beginning work on it. The requests should include specific implementation details, including areas of the application that will be affected by the change (including designs if applicable), and any other relevant information that might be required for a speedy review. However, proposals are not required for small changes, bug fixes, or documentation improvements. Small changes and bug fixes should be tied to an [issue](https://github.com/enricai/LibreChat/issues) and included in the corresponding pull request for tracking purposes.

Please note that a pull request involving a feature that has not been reviewed and approved by the project maintainers may be rejected. We appreciate your understanding and cooperation.

Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: [danny-avila]
github: [enricai]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/enricai/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/enricai/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/QUESTION.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/enricai/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
2 changes: 1 addition & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This security policy applies to the following GitHub repository:

## Contact

If you have any questions or concerns regarding the security of our project, please join our [Discord community](https://discord.librechat.ai) and report them in the appropriate channel. You can also reach out to us by [opening an issue](https://github.com/danny-avila/LibreChat/issues/new) on GitHub. Please note that the response time may vary depending on the nature and severity of the inquiry.
If you have any questions or concerns regarding the security of our project, please join our [Discord community](https://discord.librechat.ai) and report them in the appropriate channel. You can also reach out to us by [opening an issue](https://github.com/enricai/LibreChat/issues/new) on GitHub. Please note that the response time may vary depending on the nature and severity of the inquiry.

## Acknowledgments

Expand Down
2 changes: 1 addition & 1 deletion .github/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# jobs:
# tests_e2e:
# name: Run Playwright tests
# if: github.event.pull_request.head.repo.full_name == 'danny-avila/LibreChat'
# if: github.event.pull_request.head.repo.full_name == 'enricai/LibreChat'
# timeout-minutes: 60
# runs-on: ubuntu-latest
# env:
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Pull Request Template

⚠️ Before Submitting a PR, Please Review:
- Please ensure that you have thoroughly read and understood the [Contributing Docs](https://github.com/danny-avila/LibreChat/blob/main/.github/CONTRIBUTING.md) before submitting your Pull Request.
- Please ensure that you have thoroughly read and understood the [Contributing Docs](https://github.com/enricai/LibreChat/blob/main/.github/CONTRIBUTING.md) before submitting your Pull Request.

⚠️ Documentation Updates Notice:
- Kindly note that documentation updates are managed in this repository: [librechat.ai](https://github.com/LibreChat-AI/librechat.ai)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/a11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
axe-linter:
runs-on: ubuntu-latest
if: >
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'danny-avila/LibreChat') ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'enricai/LibreChat') ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.run_workflow == 'true')

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
if: |
github.repository == 'danny-avila/LibreChat' &&
github.repository == 'enricai/LibreChat' &&
(github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success')
steps:
- name: Checkout repository
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<img
src="https://img.shields.io/badge/DOCS-blue.svg?style=for-the-badge&logo=read-the-docs&logoColor=white&labelColor=000000&logoWidth=20">
</a>
<a aria-label="Sponsors" href="https://github.com/sponsors/danny-avila">
<a aria-label="Sponsors" href="https://github.com/sponsors/enricai">
<img
src="https://img.shields.io/badge/SPONSORS-brightgreen.svg?style=for-the-badge&logo=github-sponsors&logoColor=white&labelColor=000000&logoWidth=20">
</a>
Expand Down Expand Up @@ -136,7 +136,7 @@ Click on the thumbnail to open the video☝️
## 📝 Changelog

Keep up with the latest updates by visiting the releases page and notes:
- [Releases](https://github.com/danny-avila/LibreChat/releases)
- [Releases](https://github.com/enricai/LibreChat/releases)
- [Changelog](https://www.librechat.ai/changelog)

**⚠️ Please consult the [changelog](https://www.librechat.ai/changelog) for breaking changes before updating.**
Expand All @@ -146,13 +146,13 @@ Keep up with the latest updates by visiting the releases page and notes:
## ⭐ Star History

<p align="center">
<a href="https://star-history.com/#danny-avila/LibreChat&Date">
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=danny-avila/LibreChat&type=Date&theme=dark" onerror="this.src='https://api.star-history.com/svg?repos=danny-avila/LibreChat&type=Date'" />
<a href="https://star-history.com/#enricai/LibreChat&Date">
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=enricai/LibreChat&type=Date&theme=dark" onerror="this.src='https://api.star-history.com/svg?repos=enricai/LibreChat&type=Date'" />
</a>
</p>
<p align="center">
<a href="https://trendshift.io/repositories/4685" target="_blank" style="padding: 10px;">
<img src="https://trendshift.io/api/badge/repositories/4685" alt="danny-avila%2FLibreChat | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/>
<img src="https://trendshift.io/api/badge/repositories/4685" alt="enricai%2FLibreChat | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/>
</a>
<a href="https://runacap.com/ross-index/q1-24/" target="_blank" rel="noopener" style="margin-left: 20px;">
<img style="width: 260px; height: 56px" src="https://runacap.com/wp-content/uploads/2024/04/ROSS_badge_white_Q1_2024.svg" alt="ROSS Index - Fastest Growing Open-Source Startups in Q1 2024 | Runa Capital" width="260" height="56"/>
Expand All @@ -171,6 +171,6 @@ For new features, components, or extensions, please open an issue and discuss be

## 💖 This project exists in its current state thanks to all the people who contribute

<a href="https://github.com/danny-avila/LibreChat/graphs/contributors">
<img src="https://contrib.rocks/image?repo=danny-avila/LibreChat" />
<a href="https://github.com/enricai/LibreChat/graphs/contributors">
<img src="https://contrib.rocks/image?repo=enricai/LibreChat" />
</a>
2 changes: 1 addition & 1 deletion api/app/clients/ChatGPTClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class ChatGPTClient extends BaseClient {

if (this.useOpenRouter) {
opts.headers['HTTP-Referer'] = 'https://librechat.ai';
opts.headers['X-Title'] = 'LibreChat';
opts.headers['X-Title'] = 'EnricChat';
}

if (this.options.proxy) {
Expand Down
4 changes: 2 additions & 2 deletions api/app/clients/OpenAIClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ class OpenAIClient extends BaseClient {
configOptions.baseOptions = {
headers: {
'HTTP-Referer': 'https://librechat.ai',
'X-Title': 'LibreChat',
'X-Title': 'EnricChat',
},
};
}
Expand Down Expand Up @@ -1090,7 +1090,7 @@ ${convo}
if (this.useOpenRouter) {
opts.defaultHeaders = {
'HTTP-Referer': 'https://librechat.ai',
'X-Title': 'LibreChat',
'X-Title': 'EnricChat',
};
}

Expand Down
4 changes: 2 additions & 2 deletions api/app/clients/tools/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
{
"authField": "GOOGLE_CSE_ID",
"label": "Google CSE ID",
"description": "This is your Google Custom Search Engine ID. For instructions on how to obtain this, see <a href='https://github.com/danny-avila/LibreChat/blob/main/docs/features/plugins/google_search.md'>Our Docs</a>."
"description": "This is your Google Custom Search Engine ID. For instructions on how to obtain this, see <a href='https://github.com/enricai/LibreChat/blob/main/docs/features/plugins/google_search.md'>Our Docs</a>."
},
{
"authField": "GOOGLE_SEARCH_API_KEY",
"label": "Google API Key",
"description": "This is your Google Custom Search API Key. For instructions on how to obtain this, see <a href='https://github.com/danny-avila/LibreChat/blob/main/docs/features/plugins/google_search.md'>Our Docs</a>."
"description": "This is your Google Custom Search API Key. For instructions on how to obtain this, see <a href='https://github.com/enricai/LibreChat/blob/main/docs/features/plugins/google_search.md'>Our Docs</a>."
}
]
},
Expand Down
3 changes: 2 additions & 1 deletion api/config/parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const traverse = require('traverse');

const SPLAT_SYMBOL = Symbol.for('splat');
const MESSAGE_SYMBOL = Symbol.for('message');
const CONSOLE_JSON_LONG_STRING_LENGTH=parseInt(process.env.CONSOLE_JSON_LONG_STRING_LENGTH) || 255;

const sensitiveKeys = [
/^(sk-)[^\s]+/, // OpenAI API key pattern
Expand Down Expand Up @@ -211,7 +212,7 @@ const jsonTruncateFormat = winston.format((info) => {
const newObj = {};
Object.entries(obj).forEach(([key, value]) => {
if (typeof value === 'string') {
newObj[key] = truncateLongStrings(value, 255);
newObj[key] = truncateLongStrings(value, CONSOLE_JSON_LONG_STRING_LENGTH);
} else {
newObj[key] = truncateObject(value);
}
Expand Down
6 changes: 3 additions & 3 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/danny-avila/LibreChat.git"
"url": "git+https://github.com/enricai/LibreChat.git"
},
"keywords": [],
"author": "",
Expand All @@ -30,7 +30,7 @@
"~/*": "./*"
},
"bugs": {
"url": "https://github.com/danny-avila/LibreChat/issues"
"url": "https://github.com/enricai/LibreChat/issues"
},
"homepage": "https://librechat.ai",
"dependencies": {
Expand Down Expand Up @@ -78,7 +78,7 @@
"meilisearch": "^0.38.0",
"mime": "^3.0.0",
"module-alias": "^2.2.3",
"mongoose": "^8.8.3",
"mongoose": "^8.9.5",
"multer": "^1.4.5-lts.1",
"nanoid": "^3.3.7",
"nodejs-gpt": "^1.37.4",
Expand Down
2 changes: 1 addition & 1 deletion api/server/controllers/agents/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ class AgentClient extends BaseClient {
// if (this.useOpenRouter) {
// opts.defaultHeaders = {
// 'HTTP-Referer': 'https://librechat.ai',
// 'X-Title': 'LibreChat',
// 'X-Title': 'EnricChat',
// };
// }

Expand Down
30 changes: 27 additions & 3 deletions api/server/controllers/assistants/v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ const updateAssistant = async ({ req, openai, assistant_id, updateData }) => {
}

if (hasFileSearch && !updateData.tool_resources?.file_search) {
const vectorStore = await openai.beta.assistants.vector_store.create(assistant_id);
updateData.tool_resources = {
...(updateData.tool_resources ?? {}),
file_search: {
vector_store_ids: [],
vector_store_ids: [vectorStore.id],
},
};
}
Expand Down Expand Up @@ -175,10 +176,26 @@ const updateAssistant = async ({ req, openai, assistant_id, updateData }) => {
const addResourceFileId = async ({ req, openai, assistant_id, tool_resource, file_id }) => {
const assistant = await openai.beta.assistants.retrieve(assistant_id);
const { tool_resources = {} } = assistant;
const isFileSearch = tool_resource === ToolCallTypes.FILE_SEARCH;
if (isFileSearch) {
const vectorStore = await openai.beta.assistants.vector_store.create(assistant_id);
await openai.beta.assistants.vector_store.files.create(vectorStore.id, { file_id });
file_id = vectorStore.id;
}

if (tool_resources[tool_resource]) {
tool_resources[tool_resource].file_ids.push(file_id);
if (isFileSearch) {
// only one vectordb per assistant is needed
tool_resources[tool_resource] = { vector_store_ids: [file_id] };
} else {
tool_resources[tool_resource].file_ids.push(file_id);
}
} else {
tool_resources[tool_resource] = { file_ids: [file_id] };
if (isFileSearch) {
tool_resources[tool_resource] = { vector_store_ids: [file_id] };
} else {
tool_resources[tool_resource] = { file_ids: [file_id] };
}
}

delete assistant.id;
Expand All @@ -204,7 +221,14 @@ const addResourceFileId = async ({ req, openai, assistant_id, tool_resource, fil
const deleteResourceFileId = async ({ req, openai, assistant_id, tool_resource, file_id }) => {
const assistant = await openai.beta.assistants.retrieve(assistant_id);
const { tool_resources = {} } = assistant;
const isFileSearch = tool_resource === ToolCallTypes.FILE_SEARCH;
if (isFileSearch) {
const vectorStore = await openai.beta.assistants.vector_store.create(assistant_id);
await openai.beta.assistants.vector_store.files.del(vectorStore.id, { file_id });
}

// only one vectordb per assistant is needed, no need to delete it once it's
// created since it's OK to have a vector db with no docs
if (tool_resource && tool_resources[tool_resource]) {
const resource = tool_resources[tool_resource];
const index = resource.file_ids.indexOf(file_id);
Expand Down
2 changes: 1 addition & 1 deletion api/server/routes/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ router.get('/', async function (req, res) {
try {
/** @type {TStartupConfig} */
const payload = {
appTitle: process.env.APP_TITLE || 'LibreChat',
appTitle: process.env.APP_TITLE || 'EnricChat',
socialLogins: req.app.locals.socialLogins ?? defaultSocialLogins,
discordLoginEnabled: !!process.env.DISCORD_CLIENT_ID && !!process.env.DISCORD_CLIENT_SECRET,
facebookLoginEnabled:
Expand Down
19 changes: 17 additions & 2 deletions api/server/routes/files/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const { getStrategyFunctions } = require('~/server/services/Files/strategies');
const { getOpenAIClient } = require('~/server/controllers/assistants/helpers');
const { loadAuthValues } = require('~/app/clients/tools/util');
const { getAgent } = require('~/models/Agent');
const { getAssistant } = require('~/models/Assistant');
const { getFiles } = require('~/models/File');
const { logger } = require('~/config');

Expand Down Expand Up @@ -78,7 +79,7 @@ router.delete('/', async (req, res) => {
});
}

/* Handle entity unlinking even if no valid files to delete */
/* Handle agent unlinking even if no valid files to delete */
if (req.body.agent_id && req.body.tool_resource && dbFiles.length === 0) {
const agent = await getAgent({
id: req.body.agent_id,
Expand All @@ -88,7 +89,21 @@ router.delete('/', async (req, res) => {
const agentFiles = files.filter((f) => toolResourceFiles.includes(f.file_id));

await processDeleteRequest({ req, files: agentFiles });
res.status(200).json({ message: 'File associations removed successfully' });
res.status(200).json({ message: 'File associations removed successfully from agent' });
return;
}

/* Handle assistant unlinking even if no valid files to delete */
if (req.body.assistant_id && req.body.tool_resource && dbFiles.length === 0) {
const assistant = await getAssistant({
id: req.body.assistant_id,
});

const toolResourceFiles = assistant.tool_resources?.[req.body.tool_resource]?.file_ids ?? [];
const assistantFiles = files.filter((f) => toolResourceFiles.includes(f.file_id));

await processDeleteRequest({ req, files: assistantFiles });
res.status(200).json({ message: 'File associations removed successfully from assistant' });
return;
}

Expand Down
8 changes: 4 additions & 4 deletions api/server/services/AuthService.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const sendVerificationEmail = async (user) => {
email: user.email,
subject: 'Verify your email',
payload: {
appName: process.env.APP_TITLE || 'LibreChat',
appName: process.env.APP_TITLE || 'EnricChat',
name: user.name,
verificationLink: verificationLink,
year: new Date().getFullYear(),
Expand Down Expand Up @@ -255,7 +255,7 @@ const requestPasswordReset = async (req) => {
email: user.email,
subject: 'Password Reset Request',
payload: {
appName: process.env.APP_TITLE || 'LibreChat',
appName: process.env.APP_TITLE || 'EnricChat',
name: user.name,
link: link,
year: new Date().getFullYear(),
Expand Down Expand Up @@ -308,7 +308,7 @@ const resetPassword = async (userId, token, password) => {
email: user.email,
subject: 'Password Reset Successfully',
payload: {
appName: process.env.APP_TITLE || 'LibreChat',
appName: process.env.APP_TITLE || 'EnricChat',
name: user.name,
year: new Date().getFullYear(),
},
Expand Down Expand Up @@ -391,7 +391,7 @@ const resendVerificationEmail = async (req) => {
email: user.email,
subject: 'Verify your email',
payload: {
appName: process.env.APP_TITLE || 'LibreChat',
appName: process.env.APP_TITLE || 'EnricChat',
name: user.name,
verificationLink: verificationLink,
year: new Date().getFullYear(),
Expand Down
Loading