mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🔄 refactor: OAI Image Edit Proxy, Speech Settings Handling, Import Query Data Usage (#10281)
Some checks failed
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Has been cancelled
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Has been cancelled
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Has been cancelled
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been cancelled
Some checks failed
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Has been cancelled
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Has been cancelled
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Has been cancelled
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been cancelled
* chore: correct startupConfig usage in ImportConversations component * refactor: properly process configured speechToText and textToSpeech settings in getCustomConfigSpeech * refactor: proxy configuration by utilizing HttpsProxyAgent for OpenAI Image Edits
This commit is contained in:
parent
250209858a
commit
0e05ff484f
3 changed files with 23 additions and 24 deletions
|
|
@ -9,12 +9,10 @@ import { useLocalize } from '~/hooks';
|
|||
import { cn, logger } from '~/utils';
|
||||
|
||||
function ImportConversations() {
|
||||
const queryClient = useQueryClient();
|
||||
const startupConfig = queryClient.getQueryData<TStartupConfig>([QueryKeys.startupConfig]);
|
||||
const localize = useLocalize();
|
||||
const fileInputRef = useRef<HTMLInputElement>(null);
|
||||
const queryClient = useQueryClient();
|
||||
const { showToast } = useToastContext();
|
||||
|
||||
const fileInputRef = useRef<HTMLInputElement>(null);
|
||||
const [isUploading, setIsUploading] = useState(false);
|
||||
|
||||
const handleSuccess = useCallback(() => {
|
||||
|
|
@ -53,7 +51,8 @@ function ImportConversations() {
|
|||
const handleFileUpload = useCallback(
|
||||
async (file: File) => {
|
||||
try {
|
||||
const maxFileSize = (startupConfig as any)?.conversationImportMaxFileSize;
|
||||
const startupConfig = queryClient.getQueryData<TStartupConfig>([QueryKeys.startupConfig]);
|
||||
const maxFileSize = startupConfig?.conversationImportMaxFileSize;
|
||||
if (maxFileSize && file.size > maxFileSize) {
|
||||
const size = (maxFileSize / (1024 * 1024)).toFixed(2);
|
||||
showToast({
|
||||
|
|
@ -76,7 +75,7 @@ function ImportConversations() {
|
|||
});
|
||||
}
|
||||
},
|
||||
[uploadFile, showToast, localize, startupConfig],
|
||||
[uploadFile, showToast, localize, queryClient],
|
||||
);
|
||||
|
||||
const handleFileChange = useCallback(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue