mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-13 13:04:24 +01:00
🔄 feat: Add Configurable Cache Headers for Index.html (#4565)
* refactor: move o1 model check, after vision request check * feat(server): add configurable cache headers for index.html • Add environment variables to control index.html cache headers • Default to no-cache configuration for consistent app updates • Document cache control options in .env.example
This commit is contained in:
parent
a1647d76e0
commit
b939e24f67
4 changed files with 26 additions and 8 deletions
|
|
@ -100,8 +100,6 @@ class OpenAIClient extends BaseClient {
|
|||
this.options.modelOptions,
|
||||
);
|
||||
|
||||
this.isO1Model = /\bo1\b/i.test(this.modelOptions.model);
|
||||
|
||||
this.defaultVisionModel = this.options.visionModel ?? 'gpt-4-vision-preview';
|
||||
if (typeof this.options.attachments?.then === 'function') {
|
||||
this.options.attachments.then((attachments) => this.checkVisionRequest(attachments));
|
||||
|
|
@ -109,6 +107,8 @@ class OpenAIClient extends BaseClient {
|
|||
this.checkVisionRequest(this.options.attachments);
|
||||
}
|
||||
|
||||
this.isO1Model = /\bo1\b/i.test(this.modelOptions.model);
|
||||
|
||||
const { OPENROUTER_API_KEY, OPENAI_FORCE_PROMPT } = process.env ?? {};
|
||||
if (OPENROUTER_API_KEY && !this.azure) {
|
||||
this.apiKey = OPENROUTER_API_KEY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue