mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🔧 fix: Google Gemma Support & OpenAI Reasoning Instructions (#7196)
* 🔄 chore: Update @langchain/google-vertexai to version 0.2.5 in package.json and package-lock.json * chore: temp remove agents * 🔄 chore: Update @langchain/google-genai to version 0.2.5 in package.json and package-lock.json * 🔄 chore: Update @langchain/community to version 0.3.42 in package.json and package-lock.json * 🔄 chore: Add license information for @langchain/textsplitters in package-lock.json * 🔄 chore: Update @langchain/core to version 0.3.51 in package.json and package-lock.json * 🔄 chore: Update openai dependency to version 4.96.2 in package.json and package-lock.json * chore: @librechat/agents to v2.4.30 * fix: streaming condition in ModelEndHandler to account for boundModel `disableStreaming` setting * fix: update regex for noSystemModel and refactor message handling in AgentClient * feat: Google Gemma models * chore: remove unnecessary empty JSX fragment in PopoverButtons component
This commit is contained in:
parent
5d6d13efe8
commit
37b50736bc
11 changed files with 120 additions and 121 deletions
|
|
@ -44,7 +44,7 @@ export default function PopoverButtons({
|
|||
const endpoint = overrideEndpoint ?? endpointType ?? _endpoint ?? '';
|
||||
const model = overrideModel ?? _model;
|
||||
|
||||
const isGenerativeModel = model?.toLowerCase().includes('gemini') ?? false;
|
||||
const isGenerativeModel = /gemini|learnlm|gemma/.test(model ?? '') ?? false;
|
||||
const isChatModel = (!isGenerativeModel && model?.toLowerCase().includes('chat')) ?? false;
|
||||
const isTextModel = !isGenerativeModel && !isChatModel && /code|text/.test(model ?? '');
|
||||
|
||||
|
|
@ -133,7 +133,6 @@ export default function PopoverButtons({
|
|||
</Button>
|
||||
))}
|
||||
</div>
|
||||
{/* eslint-disable-next-line @typescript-eslint/no-unnecessary-condition */}
|
||||
{disabled ? null : (
|
||||
<div className="flex w-[150px] items-center justify-end">
|
||||
{additionalButtons[settingsView].map((button, index) => (
|
||||
|
|
|
|||
|
|
@ -34,10 +34,7 @@ function getOpenAIColor(_model: string | null | undefined) {
|
|||
function getGoogleIcon(model: string | null | undefined, size: number) {
|
||||
if (model?.toLowerCase().includes('code') === true) {
|
||||
return <CodeyIcon size={size * 0.75} />;
|
||||
} else if (
|
||||
model?.toLowerCase().includes('gemini') === true ||
|
||||
model?.toLowerCase().includes('learnlm') === true
|
||||
) {
|
||||
} else if (/gemini|learnlm|gemma/.test(model?.toLowerCase() ?? '')) {
|
||||
return <GeminiIcon size={size * 0.7} />;
|
||||
} else {
|
||||
return <PaLMIcon size={size * 0.7} />;
|
||||
|
|
@ -52,6 +49,8 @@ function getGoogleModelName(model: string | null | undefined) {
|
|||
model?.toLowerCase().includes('learnlm') === true
|
||||
) {
|
||||
return 'Gemini';
|
||||
} else if (model?.toLowerCase().includes('gemma') === true) {
|
||||
return 'Gemma';
|
||||
} else {
|
||||
return 'PaLM2';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue