aait 2.3.12.3__tar.gz → 2.3.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aait-2.3.13/PKG-INFO +9 -0
- aait-2.3.13/aait.egg-info/PKG-INFO +9 -0
- {aait-2.3.12.3 → aait-2.3.13}/aait.egg-info/SOURCES.txt +3 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/llm/answers_llama.py +111 -34
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWConverseLLM.py +1 -1
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWExtractTokens.py +3 -4
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWFindFilesFromDir.py +17 -153
- aait-2.3.13/orangecontrib/AAIT/widgets/OWGenerateWord.py +576 -0
- aait-2.3.13/orangecontrib/AAIT/widgets/OWGetPages.py +144 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWLLMEngine.py +17 -6
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWQueryLLM.py +4 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWReranking.py +4 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWSortAndSelect.py +1 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owedgellm.ui +81 -5
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owextracttokens.ui +2 -2
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owfindfilesfromdir.ui +0 -14
- aait-2.3.13/orangecontrib/AAIT/widgets/designer/owgenerate_word.ui +105 -0
- aait-2.3.13/orangecontrib/AAIT/widgets/designer/owgetpages.ui +87 -0
- aait-2.3.13/orangecontrib/AAIT/widgets/icons/book.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/setup.py +1 -1
- aait-2.3.12.3/PKG-INFO +0 -32
- aait-2.3.12.3/aait.egg-info/PKG-INFO +0 -32
- aait-2.3.12.3/orangecontrib/AAIT/widgets/OWGenerateWord.py +0 -608
- aait-2.3.12.3/orangecontrib/AAIT/widgets/designer/owgenerate_word.ui +0 -58
- {aait-2.3.12.3 → aait-2.3.13}/License.txt +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/aait.egg-info/dependency_links.txt +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/aait.egg-info/entry_points.txt +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/aait.egg-info/namespace_packages.txt +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/aait.egg-info/requires.txt +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/aait.egg-info/top_level.txt +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/__init__.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/fix_torch/fix_torch_dll_error.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/fix_torch/libomp140.x86_64.dll +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/llm/__init__.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/llm/answers.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/llm/chunking.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/llm/embeddings.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/llm/lemmes.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/llm/lmstudio.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/llm/process_documents.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/llm/prompt_management.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/llm/translations.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/optimiser/__init__.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/optimiser/optuna_multi.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/MetManagement.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/OperationSystem.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/SimpleDialogQt.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/__init__.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/aait_repo_file.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/aait_table_viewer.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/base_widget.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/delta_local_shared_fodler.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/import_uic.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/initialize_from_ini.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/mac_utils.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/shared_functions.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/shared_variables.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/subprocess_management.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/thread_management.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/tools/__init__.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/tools/change_owcorpus.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/tools/concat_splitted_pypi.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/tools/first_time_check.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/tools/owcorpus_ok.txt +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/unlink_table_domain.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/widget_positioning.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/utils/windows_utils.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWAAITResourcesManager.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWAccumulator.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWAddColumns.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWApplyRules.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWAutoShowCreateInstance.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWAutoShowTable.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWCN2rule_view.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWChunking.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWConcatRules.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWCreateEmbeddings.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWDisplayMD.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWEditTable.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWEmptySwitch.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWEndLoop.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWExecuteScript.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWExtraChunks.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWFileMetadata.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWFileSyncChecker.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWFileWithPath.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWFusionNM.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWGenerateQuestions.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWGenerateSynthesis.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWInputSelector.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWKeywords.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWKeywordsDetection.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWLMStudio.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWLanguageDetection.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWLargeLanguageModel.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWLemmatizer.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWLoadDocuments.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_CE_MiniLML6.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_Embeddings.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_Falcon.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_HelsinkiEnFr.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_HelsinkiFrEn.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_MPNET.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_Mistral.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_Qwen.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_Qwen1B5_Q6.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_Qwen2_5_32B.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_Qwen3B_Q4.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q4.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q6.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_Solar.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_SolarUncensored.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_EN.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_FR.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWOperationSystem.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWOptimisation.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWOptimisationSelection.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWOptimisationSendScore.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWProcessDocumentsFromPath.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWQuadrantclicker.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWRandomData.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWSaveFilepathEntry.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWSelectColumnDynamique.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWSelectRowsDynamic.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWStartLoop.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWTable2Corpus.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWTranslation.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWTrigger.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/OWUnzipFolder.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/POW_Wfactory.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/__init__.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owMarkdown.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/ow_OperationSystem.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/ow_in_or_out_path.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/ow_widget_random_data.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owaccumulator.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owaddcolumns.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owapplyrules.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owchunking.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owconcatrules.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owconversellm.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owembeddings.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owemptyswitch.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owendloop.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owexecutescript.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owexecutescript_TEST.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owextrachunks.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owfilemetadata.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owfilesyncchecker.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owfilewithpath.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owfusion_nm.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owgeneratequestions.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owgeneratesynthesis.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owkeyword.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owkeywordsdetection.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owlangdetect.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owlargelanguagemodel.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owlemmatizer.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owllm4all.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owloaddocuments.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owloadworkflow.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_ce_minilml6.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_falcon.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_en_fr.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_fr_en.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_mistral.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_mpnet.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_qwen.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_2.5_32b.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_1.5b_q6.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_3b_q4.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_7b_q4.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_7b_q6.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_qwencoder_7b.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_solar.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_solar_uncensored.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_en.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_fr.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/ownumberpointinrules.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owprocessdocuments.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owquadrant_clicker.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owqueryllm.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owreranking.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owsavewithpath.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owselect_column_dynamic.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owselect_row_dynamic.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owsortandselect.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owstartloop.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owtable2corpus.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owtranslation.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owtrigger.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/designer/owunzipfolder.ui +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/CN2RuleViewer.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/CreateInstance.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/MDViewer.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/Mistral.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/Table.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/apply_rules.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/blue_down_arrow.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/category.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/dark_green.txt +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/de.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/document_generator.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/documents.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/edge_llm.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/endloop.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/extra_chunks.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/green_check.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/in_or_out.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/input.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/languages.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/lm_studio.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/local_interf_img_multi_pull.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/local_interf_multi_pull.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/local_interf_pull.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/local_interf_push.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/local_interf_text_pull.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/logo_solar.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/logo_uncensoredsolar.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/logo_upload.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/models.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/operationSystem.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/optimisation.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/optimizer.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/output.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owCN2_intersect_rules.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owaccumulator.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owchunking.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owconversellm.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owedittable.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owembeddings.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owemptyswitch.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owenvinfo.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owexecutescript.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owextracttokens.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owfilemetadata.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owfilesfromdir.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owfilesyncchecker.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owfilewithpath.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owfusion_nm.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owgeneratequestions.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owgeneratesynthesis.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owkeywords.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owkeywordsdetection.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owlargelanguagemodel.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owlemmatizer.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owloaddocuments.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owmodel_ce_minilml6.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owmodel_embeddings.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owmodel_falcon.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_en_fr.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_fr_en.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owmodel_mpnet.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_en.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_fr.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owoptimisation.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owoptimisationselection.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owqueryllm.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owreranking.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owsavefilepathentry.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owselectcolumndynamique.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owsortandselect.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owtable2corpus.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owtranslation.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/owtrigger.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/processdocuments.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/quadrantclicker.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/qwen-color.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/select_dynamic_row.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/startloop.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/tools.png +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/widgetFactory.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/AAIT/widgets/icons/zip.svg +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/orangecontrib/__init__.py +0 -0
- {aait-2.3.12.3 → aait-2.3.13}/setup.cfg +0 -0
aait-2.3.13/PKG-INFO
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aait
|
|
3
|
+
Version: 2.3.13
|
|
4
|
+
Summary: Advanced Artificial Intelligence Tools is a package meant to develop and enable advanced AI functionalities in Orange
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: Orange community
|
|
7
|
+
Author-email:
|
|
8
|
+
Keywords: orange3 add-on
|
|
9
|
+
License-File: License.txt
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aait
|
|
3
|
+
Version: 2.3.13
|
|
4
|
+
Summary: Advanced Artificial Intelligence Tools is a package meant to develop and enable advanced AI functionalities in Orange
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: Orange community
|
|
7
|
+
Author-email:
|
|
8
|
+
Keywords: orange3 add-on
|
|
9
|
+
License-File: License.txt
|
|
@@ -72,6 +72,7 @@ orangecontrib/AAIT/widgets/OWFusionNM.py
|
|
|
72
72
|
orangecontrib/AAIT/widgets/OWGenerateQuestions.py
|
|
73
73
|
orangecontrib/AAIT/widgets/OWGenerateSynthesis.py
|
|
74
74
|
orangecontrib/AAIT/widgets/OWGenerateWord.py
|
|
75
|
+
orangecontrib/AAIT/widgets/OWGetPages.py
|
|
75
76
|
orangecontrib/AAIT/widgets/OWInputSelector.py
|
|
76
77
|
orangecontrib/AAIT/widgets/OWKeywords.py
|
|
77
78
|
orangecontrib/AAIT/widgets/OWKeywordsDetection.py
|
|
@@ -144,6 +145,7 @@ orangecontrib/AAIT/widgets/designer/owfusion_nm.ui
|
|
|
144
145
|
orangecontrib/AAIT/widgets/designer/owgenerate_word.ui
|
|
145
146
|
orangecontrib/AAIT/widgets/designer/owgeneratequestions.ui
|
|
146
147
|
orangecontrib/AAIT/widgets/designer/owgeneratesynthesis.ui
|
|
148
|
+
orangecontrib/AAIT/widgets/designer/owgetpages.ui
|
|
147
149
|
orangecontrib/AAIT/widgets/designer/owkeyword.ui
|
|
148
150
|
orangecontrib/AAIT/widgets/designer/owkeywordsdetection.ui
|
|
149
151
|
orangecontrib/AAIT/widgets/designer/owlangdetect.ui
|
|
@@ -190,6 +192,7 @@ orangecontrib/AAIT/widgets/icons/Mistral.png
|
|
|
190
192
|
orangecontrib/AAIT/widgets/icons/Table.svg
|
|
191
193
|
orangecontrib/AAIT/widgets/icons/apply_rules.svg
|
|
192
194
|
orangecontrib/AAIT/widgets/icons/blue_down_arrow.svg
|
|
195
|
+
orangecontrib/AAIT/widgets/icons/book.png
|
|
193
196
|
orangecontrib/AAIT/widgets/icons/category.svg
|
|
194
197
|
orangecontrib/AAIT/widgets/icons/dark_green.txt
|
|
195
198
|
orangecontrib/AAIT/widgets/icons/de.png
|
|
@@ -6,9 +6,15 @@ try:
|
|
|
6
6
|
except:
|
|
7
7
|
pass
|
|
8
8
|
import psutil
|
|
9
|
+
import base64
|
|
9
10
|
import ntpath
|
|
10
11
|
import platform
|
|
11
12
|
from llama_cpp import Llama
|
|
13
|
+
try:
|
|
14
|
+
from llama_cpp.llama_chat_format import Qwen3VLChatHandler
|
|
15
|
+
except Exception as e:
|
|
16
|
+
print("Missing installs for Qwen3-VL:", e)
|
|
17
|
+
pass
|
|
12
18
|
from Orange.data import Domain, StringVariable, Table
|
|
13
19
|
|
|
14
20
|
|
|
@@ -105,7 +111,7 @@ def count_tokens(model: Llama, text: str) -> int:
|
|
|
105
111
|
return len(tokens)
|
|
106
112
|
|
|
107
113
|
|
|
108
|
-
def load_model(model_path, use_gpu, n_ctx=10000):
|
|
114
|
+
def load_model(model_path, use_gpu, n_ctx=10000, k_cache=0, v_cache=0):
|
|
109
115
|
"""
|
|
110
116
|
Charge un modèle GGUF avec llama_cpp.Llama.
|
|
111
117
|
|
|
@@ -135,6 +141,8 @@ def load_model(model_path, use_gpu, n_ctx=10000):
|
|
|
135
141
|
use_mlock=False,
|
|
136
142
|
embedding=False,
|
|
137
143
|
verbose=True, #hahahahahaha remettre a False
|
|
144
|
+
type_k=k_cache,
|
|
145
|
+
type_v=v_cache
|
|
138
146
|
)
|
|
139
147
|
return model
|
|
140
148
|
except Exception as e:
|
|
@@ -153,7 +161,14 @@ def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, query_paramet
|
|
|
153
161
|
class_dom = list(data.domain.class_vars)
|
|
154
162
|
|
|
155
163
|
# Chargement modèle (llama_cpp)
|
|
156
|
-
|
|
164
|
+
if not "Qwen3-VL-8B-Instruct" in model_path:
|
|
165
|
+
model = load_model(model_path=model_path,
|
|
166
|
+
use_gpu=use_gpu,
|
|
167
|
+
n_ctx=n_ctx,
|
|
168
|
+
k_cache=query_parameters["k_cache"],
|
|
169
|
+
v_cache=query_parameters["v_cache"])
|
|
170
|
+
else:
|
|
171
|
+
model = load_Qwen3VL(model_path=model_path, n_ctx=n_ctx)
|
|
157
172
|
if model is None:
|
|
158
173
|
return None
|
|
159
174
|
# Paramètres de génération par défaut
|
|
@@ -172,27 +187,34 @@ def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, query_paramet
|
|
|
172
187
|
assistant_prompt = row["assistant prompt"].value if "assistant prompt" in data.domain else ""
|
|
173
188
|
|
|
174
189
|
# Appliquer ton template existant (inchangé)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
190
|
+
if not "Qwen3-VL-8B-Instruct" in model_path:
|
|
191
|
+
prompt = prompt_management.apply_prompt_template(
|
|
192
|
+
model_path,
|
|
193
|
+
user_prompt=prompt,
|
|
194
|
+
assistant_prompt=assistant_prompt,
|
|
195
|
+
system_prompt=system_prompt
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
prompt = handle_context_length(prompt, model, n_ctx, method="truncate", margin=query_parameters["max_tokens"], progress_callback=progress_callback)
|
|
199
|
+
|
|
200
|
+
answer = run_query(
|
|
201
|
+
prompt,
|
|
202
|
+
model=model,
|
|
203
|
+
max_tokens=query_parameters["max_tokens"],
|
|
204
|
+
temperature=query_parameters["temperature"],
|
|
205
|
+
top_p=query_parameters["top_p"],
|
|
206
|
+
top_k=query_parameters["top_k"],
|
|
207
|
+
repeat_penalty=query_parameters["repeat_penalty"],
|
|
208
|
+
workflow_id=workflow_id,
|
|
209
|
+
argself=argself,
|
|
210
|
+
progress_callback=progress_callback
|
|
211
|
+
)
|
|
212
|
+
else:
|
|
213
|
+
image_paths = [p.strip() for p in row["image paths"].value.split(";")] if "image paths" in data.domain else []
|
|
214
|
+
answer = run_Qwen3VL_query(query=prompt,
|
|
215
|
+
image_paths=image_paths,
|
|
216
|
+
model=model,
|
|
217
|
+
progress_callback=progress_callback)
|
|
196
218
|
|
|
197
219
|
if answer == "":
|
|
198
220
|
answer = (
|
|
@@ -251,6 +273,7 @@ class StopCallback:
|
|
|
251
273
|
|
|
252
274
|
return True # Continue generation
|
|
253
275
|
|
|
276
|
+
|
|
254
277
|
def write_tokens_to_file(token: str, workflow_id=""):
|
|
255
278
|
chemin_dossier = MetManagement.get_api_local_folder(workflow_id=workflow_id)
|
|
256
279
|
if os.path.exists(chemin_dossier):
|
|
@@ -325,7 +348,7 @@ def run_query(prompt, model, max_tokens=4096, temperature=0, top_p=0, top_k=40,
|
|
|
325
348
|
return answer
|
|
326
349
|
|
|
327
350
|
|
|
328
|
-
def generate_conversation(table, model, conversation=None, n_ctx=32768, progress_callback=None, argself=None):
|
|
351
|
+
def generate_conversation(table, model, conversation=None, n_ctx=32768, query_parameters=None, workflow_id="", progress_callback=None, argself=None):
|
|
329
352
|
"""
|
|
330
353
|
Generates a response using a language model and appends it to a conversation.
|
|
331
354
|
|
|
@@ -380,7 +403,7 @@ def generate_conversation(table, model, conversation=None, n_ctx=32768, progress
|
|
|
380
403
|
prompt += prompt_management.apply_user_template(model_path, user_prompt)
|
|
381
404
|
prompt += prompt_management.apply_assistant_template(model_path, assistant_prompt)
|
|
382
405
|
|
|
383
|
-
prompt = handle_context_length(prompt, model, n_ctx, method="truncate", progress_callback=progress_callback)
|
|
406
|
+
prompt = handle_context_length(prompt, model, n_ctx, method="truncate", margin=query_parameters["max_tokens"], progress_callback=progress_callback)
|
|
384
407
|
|
|
385
408
|
# Return progression to fill the user & assistant cards
|
|
386
409
|
progress_callback(("user", user_prompt))
|
|
@@ -390,7 +413,7 @@ def generate_conversation(table, model, conversation=None, n_ctx=32768, progress
|
|
|
390
413
|
conversation.append({"role": "user", "content": user_prompt})
|
|
391
414
|
|
|
392
415
|
# Generate the answer
|
|
393
|
-
answer = run_query(prompt, model=model, argself=argself, progress_callback=progress_callback)
|
|
416
|
+
answer = run_query(prompt, model=model, argself=argself, workflow_id=workflow_id, progress_callback=progress_callback)
|
|
394
417
|
|
|
395
418
|
# Split the thinking block and remove it from the answer
|
|
396
419
|
think_text, final_answer = split_think(answer=answer)
|
|
@@ -431,13 +454,6 @@ def split_think(answer: str):
|
|
|
431
454
|
return think_text, final_answer
|
|
432
455
|
|
|
433
456
|
|
|
434
|
-
def conversation_to_text(conversation):
|
|
435
|
-
if not conversation:
|
|
436
|
-
return ""
|
|
437
|
-
else:
|
|
438
|
-
pass #TODO
|
|
439
|
-
|
|
440
|
-
|
|
441
457
|
def handle_context_length(prompt, model, n_ctx, method="truncate", margin=0, progress_callback=None):
|
|
442
458
|
"""
|
|
443
459
|
Truncate a prompt to fit within n_ctx tokens, leaving margin for generation.
|
|
@@ -456,11 +472,72 @@ def handle_context_length(prompt, model, n_ctx, method="truncate", margin=0, pro
|
|
|
456
472
|
prompt = model.detokenize(tokens).decode("utf-8") if tokens else ""
|
|
457
473
|
if progress_callback:
|
|
458
474
|
warning = (
|
|
459
|
-
f"Complete prompt contains {initial_length} tokens - context limit is {limit}. "
|
|
475
|
+
f"Complete prompt contains {initial_length} tokens - context limit is {limit} (Context length - Max tokens). "
|
|
460
476
|
f"The {truncated_length} last tokens have been kept in the prompt."
|
|
461
477
|
)
|
|
462
478
|
progress_callback(("warning", warning))
|
|
463
479
|
return prompt
|
|
480
|
+
elif method == "summarize":
|
|
481
|
+
pass
|
|
464
482
|
else:
|
|
465
483
|
return prompt
|
|
466
484
|
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
# For pure display
|
|
488
|
+
def conversation_to_text(conversation):
|
|
489
|
+
if not conversation:
|
|
490
|
+
return ""
|
|
491
|
+
else:
|
|
492
|
+
pass #TODO
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
def load_Qwen3VL(model_path, n_ctx=32768):
|
|
497
|
+
folder = os.path.dirname(model_path)
|
|
498
|
+
mmproj_path = os.path.join(folder, "mmproj-Qwen3-VL-8B-Instruct-F16.gguf")
|
|
499
|
+
if not os.path.exists(mmproj_path):
|
|
500
|
+
print("Something is wrong with your model : couldn't find mmproj-Qwen3-VL-8B-Instruct-F16.gguf")
|
|
501
|
+
return None
|
|
502
|
+
chat_handler = Qwen3VLChatHandler(clip_model_path=mmproj_path)
|
|
503
|
+
model = Llama(model_path=model_path,
|
|
504
|
+
chat_handler=chat_handler,
|
|
505
|
+
n_ctx=n_ctx,
|
|
506
|
+
n_gpu_layers=-1)
|
|
507
|
+
return model
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
def run_Qwen3VL_query(query, image_paths, model, system_prompt=" ", progress_callback=None):
|
|
511
|
+
image_messages = []
|
|
512
|
+
for image_path in image_paths:
|
|
513
|
+
data_uri = convert_to_uri(image_path)
|
|
514
|
+
image_messages.append({"type": "image_url", "image_url": {"url": data_uri}})
|
|
515
|
+
image_messages.append({"type": "text", "text": query})
|
|
516
|
+
|
|
517
|
+
messages = [{"role": "system", "content": system_prompt},
|
|
518
|
+
{"role": "user", "content": image_messages}]
|
|
519
|
+
generator = model.create_chat_completion(messages=messages, stream=True)
|
|
520
|
+
|
|
521
|
+
full_response = ""
|
|
522
|
+
for chunk in generator:
|
|
523
|
+
# chunk is a dict, often with a 'choices' list
|
|
524
|
+
for choice in chunk.get("choices", []):
|
|
525
|
+
# Each choice may have a 'delta' dict with 'content'
|
|
526
|
+
delta = choice.get("delta", {})
|
|
527
|
+
token = delta.get("content")
|
|
528
|
+
if token:
|
|
529
|
+
full_response += token
|
|
530
|
+
if progress_callback is not None:
|
|
531
|
+
progress_callback(("assistant", token))
|
|
532
|
+
return full_response
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
def convert_to_uri(image_path):
|
|
537
|
+
with open(image_path, "rb") as f:
|
|
538
|
+
image_bytes = f.read()
|
|
539
|
+
b64_data = base64.b64encode(image_bytes).decode("utf-8")
|
|
540
|
+
data_uri = f"data:image/png;base64,{b64_data}"
|
|
541
|
+
return data_uri
|
|
542
|
+
|
|
543
|
+
|
|
@@ -164,7 +164,7 @@ class OWConverseLLM(widget.OWWidget):
|
|
|
164
164
|
elif action == "user":
|
|
165
165
|
user_card = UserMessageCard(value)
|
|
166
166
|
self.add_message_card(user_card)
|
|
167
|
-
elif action == "assistant
|
|
167
|
+
elif action == "assistant":
|
|
168
168
|
if self.current_assistant_card is None:
|
|
169
169
|
assistant_card = AssistantMessageCard(value)
|
|
170
170
|
self.add_message_card(assistant_card)
|
|
@@ -3,7 +3,6 @@ import sys
|
|
|
3
3
|
|
|
4
4
|
from Orange.data import Table, Domain, StringVariable
|
|
5
5
|
from AnyQt.QtWidgets import QApplication
|
|
6
|
-
from Orange.widgets import widget
|
|
7
6
|
from Orange.widgets.settings import Setting
|
|
8
7
|
from Orange.widgets.utils.signals import Input, Output
|
|
9
8
|
|
|
@@ -15,7 +14,7 @@ if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).
|
|
|
15
14
|
else:
|
|
16
15
|
from orangecontrib.AAIT.utils.import_uic import uic
|
|
17
16
|
from orangecontrib.AAIT.utils.initialize_from_ini import apply_modification_from_python_file
|
|
18
|
-
|
|
17
|
+
from orangecontrib.AAIT.utils import base_widget
|
|
19
18
|
|
|
20
19
|
@apply_modification_from_python_file(filepath_original_widget=__file__)
|
|
21
20
|
class OWExtractTokens(base_widget.BaseListWidget):
|
|
@@ -28,7 +27,7 @@ class OWExtractTokens(base_widget.BaseListWidget):
|
|
|
28
27
|
gui = os.path.join(os.path.dirname(os.path.abspath(__file__)), "designer/owextracttokens.ui")
|
|
29
28
|
want_control_area = False
|
|
30
29
|
priority = 1060
|
|
31
|
-
selected_column_name = Setting("")
|
|
30
|
+
selected_column_name = Setting("content")
|
|
32
31
|
|
|
33
32
|
class Inputs:
|
|
34
33
|
data = Input("Data", Table)
|
|
@@ -51,7 +50,7 @@ class OWExtractTokens(base_widget.BaseListWidget):
|
|
|
51
50
|
# Qt Management
|
|
52
51
|
self.setFixedWidth(470)
|
|
53
52
|
self.setFixedHeight(600)
|
|
54
|
-
uic.loadUi(self.gui, self)
|
|
53
|
+
#uic.loadUi(self.gui, self)
|
|
55
54
|
|
|
56
55
|
# Data Management
|
|
57
56
|
self.data = None
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
1
3
|
import Orange.data
|
|
2
4
|
from AnyQt.QtWidgets import QApplication, QLineEdit, QCheckBox,QSpinBox, QPushButton
|
|
3
5
|
from Orange.data import StringVariable, Table, Domain
|
|
4
6
|
from Orange.widgets.utils.signals import Input, Output
|
|
5
7
|
from Orange.widgets.settings import Setting
|
|
6
8
|
from datetime import datetime, timedelta
|
|
7
|
-
import openpyxl
|
|
8
|
-
import os
|
|
9
|
-
import sys
|
|
10
|
-
import shutil
|
|
11
|
-
from openpyxl import Workbook, load_workbook
|
|
12
|
-
|
|
13
9
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
14
10
|
from Orange.widgets.orangecontrib.AAIT.utils import base_widget
|
|
15
11
|
from Orange.widgets.orangecontrib.AAIT.utils.initialize_from_ini import apply_modification_from_python_file
|
|
@@ -34,7 +30,6 @@ class OWFileFromDir(base_widget.BaseListWidget):
|
|
|
34
30
|
recursive = Setting("False")
|
|
35
31
|
filter_per_date = Setting("False")
|
|
36
32
|
time_filter= Setting("0-0-0-1")
|
|
37
|
-
identify_sheets = Setting("False")
|
|
38
33
|
|
|
39
34
|
class Inputs:
|
|
40
35
|
data = Input("Data", Orange.data.Table)
|
|
@@ -72,10 +67,8 @@ class OWFileFromDir(base_widget.BaseListWidget):
|
|
|
72
67
|
self.spinBox_day = self.findChild(QSpinBox, 'spinBox_day')
|
|
73
68
|
self.spinBox_hour = self.findChild(QSpinBox, 'spinBox_hour')
|
|
74
69
|
self.spinBox_minute = self.findChild(QSpinBox, 'spinBox_minute')
|
|
75
|
-
self.spinBox_second
|
|
76
|
-
self.
|
|
77
|
-
|
|
78
|
-
DD, JJ, SS, MM = self._parse_delta_4_numbers(self.time_filter)
|
|
70
|
+
self.spinBox_second= self.findChild(QSpinBox, 'spinBox_second')
|
|
71
|
+
DD,JJ,SS,MM=self._parse_delta_4_numbers(self.time_filter)
|
|
79
72
|
self.spinBox_day.setValue(int(DD))
|
|
80
73
|
self.spinBox_hour.setValue(int(JJ))
|
|
81
74
|
self.spinBox_minute.setValue(int(SS))
|
|
@@ -83,7 +76,6 @@ class OWFileFromDir(base_widget.BaseListWidget):
|
|
|
83
76
|
# Data Management
|
|
84
77
|
self.folderpath = None
|
|
85
78
|
self.data = None
|
|
86
|
-
self.temp_dir = None
|
|
87
79
|
self.autorun = True
|
|
88
80
|
self.post_initialized()
|
|
89
81
|
|
|
@@ -103,10 +95,6 @@ class OWFileFromDir(base_widget.BaseListWidget):
|
|
|
103
95
|
if self.recursive == "True":
|
|
104
96
|
self.comboBox.setChecked(True)
|
|
105
97
|
|
|
106
|
-
if self.identify_sheets == "True":
|
|
107
|
-
self.checkBox_sheets.setChecked(True)
|
|
108
|
-
else:
|
|
109
|
-
self.checkBox_sheets.setChecked(False)
|
|
110
98
|
|
|
111
99
|
self.comboBox.stateChanged.connect(self.on_checkbox_toggled)
|
|
112
100
|
self.checkBox_2.stateChanged.connect(self.on_checkBox_2_toggled)
|
|
@@ -114,30 +102,27 @@ class OWFileFromDir(base_widget.BaseListWidget):
|
|
|
114
102
|
self.spinBox_hour.valueChanged.connect(self.on_value_changed)
|
|
115
103
|
self.spinBox_minute.valueChanged.connect(self.on_value_changed)
|
|
116
104
|
self.spinBox_second.valueChanged.connect(self.on_value_changed)
|
|
117
|
-
self.checkBox_sheets.stateChanged.connect(self.on_checkBox_sheets_toggled)
|
|
118
105
|
|
|
119
|
-
self.pushButton_run =
|
|
106
|
+
self.pushButton_run =self.findChild(QPushButton, 'pushButton_send')
|
|
120
107
|
self.pushButton_run.clicked.connect(self.run)
|
|
121
108
|
|
|
122
|
-
def on_value_changed(self):
|
|
123
|
-
self.time_filter = str(self.spinBox_day.value()) + "-" + str(self.spinBox_hour.value()) + "-" + str(
|
|
124
|
-
self.spinBox_minute.value()) + "-" + str(self.spinBox_second.value())
|
|
125
109
|
|
|
110
|
+
def on_value_changed(self):
|
|
111
|
+
self.time_filter = str(self.spinBox_day.value())+"-"+str(self.spinBox_hour.value())+"-"+str(self.spinBox_minute.value())+"-"+str(self.spinBox_second.value())
|
|
126
112
|
def update_parameters(self):
|
|
127
|
-
self.extension = (self.edit_extension.text() or "").strip()
|
|
113
|
+
self.extension = (self.edit_extension.text() or "").strip() #a jout de la gestion d'une zone vide
|
|
128
114
|
if self.folderpath is not None:
|
|
129
115
|
self.run()
|
|
130
116
|
|
|
131
|
-
def on_checkbox_toggled(self,
|
|
117
|
+
def on_checkbox_toggled(self,state):
|
|
132
118
|
self.recursive = "True"
|
|
133
|
-
if state
|
|
119
|
+
if state==0:
|
|
134
120
|
self.recursive = "False"
|
|
135
121
|
if self.folderpath is not None:
|
|
136
122
|
self.run()
|
|
137
|
-
|
|
138
|
-
def on_checkBox_2_toggled(self, state):
|
|
123
|
+
def on_checkBox_2_toggled(self,state):
|
|
139
124
|
self.filter_per_date = "True"
|
|
140
|
-
if state
|
|
125
|
+
if state==0:
|
|
141
126
|
self.filter_per_date = "False"
|
|
142
127
|
|
|
143
128
|
if self.filter_per_date == "False":
|
|
@@ -151,79 +136,16 @@ class OWFileFromDir(base_widget.BaseListWidget):
|
|
|
151
136
|
self.spinBox_minute.setVisible(True)
|
|
152
137
|
self.spinBox_second.setVisible(True)
|
|
153
138
|
|
|
154
|
-
if self.folderpath is not None:
|
|
155
|
-
self.run()
|
|
156
|
-
|
|
157
|
-
def on_checkBox_sheets_toggled(self, state):
|
|
158
|
-
self.identify_sheets = "True"
|
|
159
|
-
if state == 0:
|
|
160
|
-
self.identify_sheets = "False"
|
|
161
|
-
if self.folderpath is not None:
|
|
162
|
-
self.run()
|
|
163
|
-
|
|
164
|
-
def split_excel_sheets(self, filepath):
|
|
165
|
-
"""
|
|
166
|
-
Découpe un fichier Excel.
|
|
167
|
-
Crée un dossier [NomFichier]_sheets dans le même répertoire que le fichier.
|
|
168
|
-
Y dépose un fichier .xlsx par feuille.
|
|
169
|
-
"""
|
|
170
|
-
new_paths = []
|
|
171
|
-
try:
|
|
172
|
-
source_dir = os.path.dirname(filepath)
|
|
173
|
-
filename_no_ext = os.path.splitext(os.path.basename(filepath))[0]
|
|
174
|
-
|
|
175
|
-
# Nom du dossier : ex "MonFichier_sheets"
|
|
176
|
-
output_folder_name = f"{filename_no_ext}_sheets"
|
|
177
|
-
output_folder_path = os.path.join(source_dir, output_folder_name)
|
|
178
|
-
|
|
179
|
-
# Création du dossier (exist_ok=True évite de planter s'il existe déjà)
|
|
180
|
-
os.makedirs(output_folder_path, exist_ok=True)
|
|
181
139
|
|
|
182
|
-
# 2. Lire le fichier source avec Openpyxl
|
|
183
|
-
wb = load_workbook(filepath, data_only=True)
|
|
184
140
|
|
|
185
|
-
for sheet_name in wb.sheetnames:
|
|
186
|
-
ws = wb[sheet_name]
|
|
187
141
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
target_path = os.path.join(output_folder_path, target_filename).replace("\\", "/")
|
|
191
|
-
|
|
192
|
-
new_wb = Workbook()
|
|
193
|
-
new_ws = new_wb.active
|
|
194
|
-
new_ws.title = sheet_name
|
|
195
|
-
|
|
196
|
-
for row in ws.iter_rows():
|
|
197
|
-
new_ws.append([
|
|
198
|
-
"" if cell.value is None else str(cell.value)
|
|
199
|
-
for cell in row
|
|
200
|
-
])
|
|
201
|
-
|
|
202
|
-
new_wb.save(target_path)
|
|
203
|
-
new_paths.append(target_path)
|
|
204
|
-
|
|
205
|
-
wb.close()
|
|
206
|
-
|
|
207
|
-
except Exception as e:
|
|
208
|
-
# En cas d'échec (ex: fichier ouvert, permissions...), on log et on renvoie l'original
|
|
209
|
-
print(f"Erreur lors de l'extraction des feuilles pour {filepath} : {e}")
|
|
210
|
-
return [filepath]
|
|
142
|
+
if self.folderpath is not None:
|
|
143
|
+
self.run()
|
|
211
144
|
|
|
212
|
-
return new_paths
|
|
213
145
|
|
|
214
146
|
def find_files(self):
|
|
215
147
|
files_data = []
|
|
216
|
-
suffixes = self.parse_extensions()
|
|
217
|
-
excel_suffixes = (".xlsx", ".xlsm", ".xls")
|
|
218
|
-
|
|
219
|
-
# Nettoyage du dossier temp précédent si nouvelle recherche
|
|
220
|
-
# (Note : ce bloc est conservé tel quel, même si on utilise maintenant des dossiers locaux)
|
|
221
|
-
if self.identify_sheets == "True" and self.temp_dir and os.path.exists(self.temp_dir):
|
|
222
|
-
try:
|
|
223
|
-
shutil.rmtree(self.temp_dir)
|
|
224
|
-
self.temp_dir = None
|
|
225
|
-
except:
|
|
226
|
-
pass
|
|
148
|
+
suffixes = self.parse_extensions() # si pas de d'extensions, elles apparaitront toutes
|
|
227
149
|
|
|
228
150
|
for i in range(len(self.folderpath)):
|
|
229
151
|
base = self.folderpath[i]
|
|
@@ -238,42 +160,8 @@ class OWFileFromDir(base_widget.BaseListWidget):
|
|
|
238
160
|
for root, _, files in traversal:
|
|
239
161
|
for file in files:
|
|
240
162
|
name = file.lower()
|
|
241
|
-
full_path = os.path.join(root, file).replace("\\", "/")
|
|
242
|
-
|
|
243
163
|
if suffixes is None or name.endswith(suffixes):
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
if self.identify_sheets == "True" and is_excel:
|
|
247
|
-
filename_no_ext = os.path.splitext(file)[0]
|
|
248
|
-
expected_folder_name = f"{filename_no_ext}_sheets"
|
|
249
|
-
expected_folder_path = os.path.join(root, expected_folder_name)
|
|
250
|
-
|
|
251
|
-
if os.path.exists(expected_folder_path) and os.path.isdir(expected_folder_path):
|
|
252
|
-
found_sheets = False
|
|
253
|
-
try:
|
|
254
|
-
existing_files = [
|
|
255
|
-
os.path.join(expected_folder_path, f).replace("\\", "/")
|
|
256
|
-
for f in os.listdir(expected_folder_path)
|
|
257
|
-
if f.endswith(".xlsx") and not f.startswith("~$")
|
|
258
|
-
]
|
|
259
|
-
if existing_files:
|
|
260
|
-
for ex_path in existing_files:
|
|
261
|
-
files_data.append([ex_path])
|
|
262
|
-
found_sheets = True
|
|
263
|
-
except OSError:
|
|
264
|
-
pass
|
|
265
|
-
# Si le dossier existait mais était vide
|
|
266
|
-
if not found_sheets:
|
|
267
|
-
split_files = self.split_excel_sheets(full_path)
|
|
268
|
-
for split_path in split_files:
|
|
269
|
-
files_data.append([split_path])
|
|
270
|
-
# 3. Le dossier n'existe pas, on lance le découpage
|
|
271
|
-
else:
|
|
272
|
-
split_files = self.split_excel_sheets(full_path)
|
|
273
|
-
for split_path in split_files:
|
|
274
|
-
files_data.append([split_path])
|
|
275
|
-
else:
|
|
276
|
-
files_data.append([full_path])
|
|
164
|
+
files_data.append([os.path.join(root, file).replace("\\", "/")])
|
|
277
165
|
return files_data
|
|
278
166
|
|
|
279
167
|
def parse_extensions(self):
|
|
@@ -442,30 +330,6 @@ class OWFileFromDir(base_widget.BaseListWidget):
|
|
|
442
330
|
def post_initialized(self):
|
|
443
331
|
pass
|
|
444
332
|
|
|
445
|
-
def get_sheet_names_from_file(self, filepath: str):
|
|
446
|
-
"""
|
|
447
|
-
Méthode simplifiée pour récupérer la liste des noms des feuilles
|
|
448
|
-
en utilisant directement les bibliothèques sous-jacentes (openpyxl/xlrd).
|
|
449
|
-
"""
|
|
450
|
-
# Récupérer l'extension en minuscules
|
|
451
|
-
extension = os.path.splitext(filepath)[1].lower()
|
|
452
|
-
sheets = []
|
|
453
|
-
|
|
454
|
-
try:
|
|
455
|
-
if extension in ('.xlsx', '.xlsm'):
|
|
456
|
-
workbook = openpyxl.load_workbook(filepath, read_only=True, data_only=False)
|
|
457
|
-
sheets = workbook.sheetnames
|
|
458
|
-
workbook.close()
|
|
459
|
-
else:
|
|
460
|
-
print(f"INFO: Extension {extension} non supportée pour l'extraction de feuilles.")
|
|
461
|
-
|
|
462
|
-
except ImportError as e:
|
|
463
|
-
self.warning(
|
|
464
|
-
f"Librairie manquante pour lire les feuilles : {e}. Assurez-vous d'avoir 'openpyxl'")
|
|
465
|
-
except Exception as e:
|
|
466
|
-
self.error(f"Impossible de lire les feuilles du fichier {os.path.basename(filepath)} : {e}")
|
|
467
|
-
return sheets
|
|
468
|
-
|
|
469
333
|
if __name__ == "__main__":
|
|
470
334
|
app = QApplication(sys.argv)
|
|
471
335
|
my_widget = OWFileFromDir()
|
|
@@ -474,4 +338,4 @@ if __name__ == "__main__":
|
|
|
474
338
|
if hasattr(app, "exec"):
|
|
475
339
|
app.exec()
|
|
476
340
|
else:
|
|
477
|
-
app.exec_()
|
|
341
|
+
app.exec_()
|