mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-16 15:35:31 +01:00
🛫 refactor: Move Encoding Logic to packages/api (#9182)
* refactor: move audio encode over to TS * refactor: audio encoding now functional in LC again * refactor: move video encode over to TS * refactor: move document encode over to TS * refactor: video encoding now functional in LC again * refactor: document encoding now functional in LC again * fix: extend file type options in AttachFileMenu to include 'google_multimodal' and update dependency array to include agent?.provider * feat: only accept pdfs if responses api is enabled for openai convos
This commit is contained in:
parent
ccb2e031dd
commit
e55264b22a
11 changed files with 408 additions and 415 deletions
|
|
@ -77,7 +77,9 @@ const AttachFileMenu = ({
|
|||
* */
|
||||
const capabilities = useAgentCapabilities(agentsConfig?.capabilities ?? defaultAgentCapabilities);
|
||||
|
||||
const handleUploadClick = (fileType?: 'image' | 'document' | 'multimodal') => {
|
||||
const handleUploadClick = (
|
||||
fileType?: 'image' | 'document' | 'multimodal' | 'google_multimodal',
|
||||
) => {
|
||||
if (!inputRef.current) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -103,7 +105,14 @@ const AttachFileMenu = ({
|
|||
) => {
|
||||
const items: MenuItemProps[] = [];
|
||||
|
||||
const shouldShowDirectAttach = isDocumentSupportedEndpoint(agent?.provider ?? endpoint);
|
||||
const currentProvider = agent?.provider ?? endpoint;
|
||||
const isOpenAIOrAzure =
|
||||
currentProvider === EModelEndpoint.openAI || currentProvider === EModelEndpoint.azureOpenAI;
|
||||
const useResponsesApiEnabled = conversation?.useResponsesApi ?? false;
|
||||
|
||||
const shouldShowDirectAttach =
|
||||
isDocumentSupportedEndpoint(currentProvider) &&
|
||||
(!isOpenAIOrAzure || useResponsesApiEnabled);
|
||||
|
||||
if (shouldShowDirectAttach) {
|
||||
items.push({
|
||||
|
|
@ -194,6 +203,7 @@ const AttachFileMenu = ({
|
|||
sharePointEnabled,
|
||||
setIsSharePointDialogOpen,
|
||||
endpoint,
|
||||
agent?.provider,
|
||||
]);
|
||||
|
||||
const menuTrigger = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue