mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-23 20:00:15 +01:00
feat(Google): Support all Text/Chat Models, Response streaming, PaLM -> Google 🤖 (#1316)
* feat: update PaLM icons * feat: add additional google models * POC: formatting inputs for Vertex AI streaming * refactor: move endpoints services outside of /routes dir to /services/Endpoints * refactor: shorten schemas import * refactor: rename PALM to GOOGLE * feat: make Google editable endpoint * feat: reusable Ask and Edit controllers based off Anthropic * chore: organize imports/logic * fix(parseConvo): include examples in googleSchema * fix: google only allows odd number of messages to be sent * fix: pass proxy to AnthropicClient * refactor: change `google` altName to `Google` * refactor: update getModelMaxTokens and related functions to handle maxTokensMap with nested endpoint model key/values * refactor: google Icon and response sender changes (Codey and Google logo instead of PaLM in all cases) * feat: google support for maxTokensMap * feat: google updated endpoints with Ask/Edit controllers, buildOptions, and initializeClient * feat(GoogleClient): now builds prompt for text models and supports real streaming from Vertex AI through langchain * chore(GoogleClient): remove comments, left before for reference in git history * docs: update google instructions (WIP) * docs(apis_and_tokens.md): add images to google instructions * docs: remove typo apis_and_tokens.md * Update apis_and_tokens.md * feat(Google): use default settings map, fully support context for both text and chat models, fully support examples for chat models * chore: update more PaLM references to Google * chore: move playwright out of workflows to avoid failing tests
This commit is contained in:
parent
8a1968b2f8
commit
583e978a82
90 changed files with 1613 additions and 784 deletions
26
client/src/components/svg/CodeyIcon.tsx
Normal file
26
client/src/components/svg/CodeyIcon.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { cn } from '~/utils';
|
||||
export default function CodeyIcon({
|
||||
size = 25,
|
||||
className = '',
|
||||
}: {
|
||||
size?: number;
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<svg
|
||||
// width="100%"
|
||||
// height="100%"
|
||||
width={size}
|
||||
height={size}
|
||||
className={cn('dark:fill-white', className)}
|
||||
viewBox="0 0 18 18"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
focusable="false"
|
||||
>
|
||||
<path
|
||||
d="M2 4.006C2 2.898 2.897 2 4.006 2h9.988C15.102 2 16 2.897 16 4.006v9.988A2.005 2.005 0 0 1 13.994 16H4.006A2.005 2.005 0 0 1 2 13.994V4.006zM13.992 9l.003-.003L10.997 6 9.75 7.247 11.503 9 9.75 10.753 10.997 12l2.997-2.997L13.992 9zm-9.99 0L4 8.997 6.997 6l1.247 1.247L6.492 9l1.753 1.753L6.997 12 4 9.003 4.003 9z"
|
||||
fillRule="evenodd"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
15
client/src/components/svg/GoogleMinimalIcon.tsx
Normal file
15
client/src/components/svg/GoogleMinimalIcon.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { cn } from '~/utils';
|
||||
export default function GoogleMinimalIcon({ className = '' }: { className?: string }) {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="currentColor"
|
||||
width="800px"
|
||||
height="800px"
|
||||
viewBox="0 0 512 512"
|
||||
className={cn('h-4 w-4', className)}
|
||||
>
|
||||
<path d="M473.16,221.48l-2.26-9.59H262.46v88.22H387c-12.93,61.4-72.93,93.72-121.94,93.72-35.66,0-73.25-15-98.13-39.11a140.08,140.08,0,0,1-41.8-98.88c0-37.16,16.7-74.33,41-98.78s61-38.13,97.49-38.13c41.79,0,71.74,22.19,82.94,32.31l62.69-62.36C390.86,72.72,340.34,32,261.6,32h0c-60.75,0-119,23.27-161.58,65.71C58,139.5,36.25,199.93,36.25,256S56.83,369.48,97.55,411.6C141.06,456.52,202.68,480,266.13,480c57.73,0,112.45-22.62,151.45-63.66,38.34-40.4,58.17-96.3,58.17-154.9C475.75,236.77,473.27,222.12,473.16,221.48Z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
50
client/src/components/svg/PaLMIcon.tsx
Normal file
50
client/src/components/svg/PaLMIcon.tsx
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
export default function PaLMIcon({
|
||||
size = 25,
|
||||
className = '',
|
||||
}: {
|
||||
size?: number;
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<svg
|
||||
// width="100%"
|
||||
// height="100%"
|
||||
width={size}
|
||||
height={size}
|
||||
className={className}
|
||||
viewBox="0 0 19 17"
|
||||
fill="none"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
focusable="false"
|
||||
>
|
||||
<path
|
||||
d="M9.62674 16.2202H9.7049C10.4225 16.2202 11.0016 15.6412 11.0016 14.9236V4.04224H8.33008V14.92C8.33008 15.6376 8.90914 16.2202 9.62674 16.2202Z"
|
||||
fill="#F9AB00"
|
||||
/>
|
||||
<path
|
||||
d="M14.6819 8.02813C13.3249 6.66752 11.2964 6.39398 9.66577 7.2004L15.0585 12.5931C15.2823 12.8169 15.6624 12.7281 15.7583 12.4297C16.2308 10.927 15.8756 9.21822 14.6819 8.02813Z"
|
||||
fill="#5BB974"
|
||||
/>
|
||||
<path
|
||||
d="M4.64953 8.02813C6.00659 6.66752 8.03507 6.39398 9.66567 7.2004L4.27297 12.5931C4.04916 12.8169 3.66904 12.7281 3.57312 12.4297C3.10064 10.927 3.45589 9.21822 4.64953 8.02813Z"
|
||||
fill="#129EAF"
|
||||
/>
|
||||
<path
|
||||
d="M14.284 3.84326C12.1383 3.84326 10.3159 5.25005 9.66577 7.20038H18.1918C18.5399 7.20038 18.7744 6.83092 18.6145 6.5183C17.8081 4.93033 16.1704 3.84326 14.284 3.84326Z"
|
||||
fill="#AF5CF7"
|
||||
/>
|
||||
<path
|
||||
d="M10.5574 1.55901C9.04053 3.07593 8.74567 5.36019 9.66577 7.20039L15.6944 1.17179C15.943 0.923113 15.8436 0.496814 15.5132 0.390239C13.8151 -0.1604 11.8896 0.226822 10.5574 1.55901Z"
|
||||
fill="#FF8BCB"
|
||||
/>
|
||||
<path
|
||||
d="M8.77408 1.55901C10.291 3.07593 10.5859 5.36019 9.66576 7.20039L3.63716 1.17179C3.38848 0.923113 3.48795 0.496814 3.81833 0.390239C5.51643 -0.1604 7.44189 0.226822 8.77408 1.55901Z"
|
||||
fill="#FA7B17"
|
||||
/>
|
||||
<path
|
||||
d="M5.04752 3.84326C7.19323 3.84326 9.01566 5.25005 9.66577 7.20038H1.13976C0.791616 7.20038 0.55715 6.83092 0.717013 6.5183C1.52343 4.93033 3.16114 3.84326 5.04752 3.84326Z"
|
||||
fill="#4285F4"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
import React from 'react';
|
||||
|
||||
export default function PaLMinimalIcon() {
|
||||
import { cn } from '~/utils';
|
||||
export default function PaLMinimalIcon({ className = '' }: { className?: string }) {
|
||||
return (
|
||||
<svg
|
||||
stroke="currentColor"
|
||||
|
|
@ -9,7 +8,7 @@ export default function PaLMinimalIcon() {
|
|||
viewBox="0 0 32 32"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
className="h-4 w-4"
|
||||
className={cn('h-4 w-4', className)}
|
||||
height="1em"
|
||||
width="1em"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
|
|
|||
|
|
@ -34,5 +34,8 @@ export { default as ChatGPTMinimalIcon } from './ChatGPTMinimalIcon';
|
|||
export { default as PluginMinimalIcon } from './PluginMinimalIcon';
|
||||
export { default as BingAIMinimalIcon } from './BingAIMinimalIcon';
|
||||
export { default as PaLMinimalIcon } from './PaLMinimalIcon';
|
||||
export { default as PaLMIcon } from './PaLMIcon';
|
||||
export { default as CodeyIcon } from './CodeyIcon';
|
||||
export { default as GoogleMinimalIcon } from './GoogleMinimalIcon';
|
||||
export { default as AnthropicMinimalIcon } from './AnthropicMinimalIcon';
|
||||
export { default as SendMessageIcon } from './SendMessageIcon';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue