aait 2.3.12__tar.gz → 2.3.12.1__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.12 → aait-2.3.12.1}/PKG-INFO +1 -1
- {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/PKG-INFO +1 -1
- {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/SOURCES.txt +7 -1
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/__init__.py +18 -18
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/answers_llama.py +125 -67
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/process_documents.py +2 -2
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/OperationSystem.py +5 -1
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/subprocess_management.py +7 -3
- aait-2.3.12.1/orangecontrib/AAIT/utils/widget_positioning.py +64 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWAddColumns.py +1 -1
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWDisplayMD.py +22 -1
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWExtractTokens.py +12 -2
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWFusionNM.py +1 -1
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWGenerateWord.py +1 -1
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLLMEngine.py +9 -1
- aait-2.3.12.1/orangecontrib/AAIT/widgets/OWModel_Embeddings.py +88 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWOperationSystem.py +41 -1
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWQueryLLM.py +1 -1
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWSelectColumnDynamique.py +1 -1
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWSortAndSelect.py +2 -2
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/ow_OperationSystem.ui +25 -2
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owedgellm.ui +1 -1
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owextracttokens.ui +51 -6
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owqueryllm.ui +1 -1
- aait-2.3.12.1/orangecontrib/AAIT/widgets/icons/CreateInstance.svg +108 -0
- aait-2.3.12.1/orangecontrib/AAIT/widgets/icons/Table.svg +86 -0
- aait-2.3.12.1/orangecontrib/AAIT/widgets/icons/owmodel_embeddings.svg +25 -0
- aait-2.3.12.1/orangecontrib/AAIT/widgets/owautoshowcreateinstance.py +750 -0
- aait-2.3.12.1/orangecontrib/AAIT/widgets/owautoshowtable.py +670 -0
- {aait-2.3.12 → aait-2.3.12.1}/setup.py +1 -1
- {aait-2.3.12 → aait-2.3.12.1}/License.txt +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/dependency_links.txt +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/entry_points.txt +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/namespace_packages.txt +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/requires.txt +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/top_level.txt +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/fix_torch/fix_torch_dll_error.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/fix_torch/libomp140.x86_64.dll +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/__init__.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/answers.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/chunking.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/embeddings.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/lemmes.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/lmstudio.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/prompt_management.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/translations.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/optimiser/__init__.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/optimiser/optuna_multi.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/MetManagement.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/SimpleDialogQt.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/__init__.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/aait_repo_file.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/aait_table_viewer.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/base_widget.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/delta_local_shared_fodler.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/import_uic.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/initialize_from_ini.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/mac_utils.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/shared_functions.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/shared_variables.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/thread_management.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/tools/__init__.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/tools/change_owcorpus.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/tools/concat_splitted_pypi.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/tools/first_time_check.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/tools/owcorpus_ok.txt +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/unlink_table_domain.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/windows_utils.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWAAITResourcesManager.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWAccumulator.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWApplyRules.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWCN2rule_view.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWChunking.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWConcatRules.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWConverseLLM.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWCreateEmbeddings.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWEditTable.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWEmptySwitch.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWEndLoop.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWExecuteScript.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWExtraChunks.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWFileMetadata.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWFileSyncChecker.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWFileWithPath.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWFindFilesFromDir.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWGenerateQuestions.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWGenerateSynthesis.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWInputSelector.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWKeywords.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWKeywordsDetection.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLMStudio.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLanguageDetection.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLargeLanguageModel.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLemmatizer.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLoadDocuments.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_CE_MiniLML6.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Falcon.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_HelsinkiEnFr.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_HelsinkiFrEn.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_MPNET.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Mistral.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen1B5_Q6.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen2_5_32B.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen3B_Q4.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q4.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q6.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Solar.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_SolarUncensored.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_EN.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_FR.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWOptimisation.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWOptimisationSelection.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWOptimisationSendScore.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWProcessDocumentsFromPath.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWRandomData.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWReranking.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWSaveFilepathEntry.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWSelectRowsDynamic.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWStartLoop.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWTable2Corpus.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWTranslation.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWTrigger.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWUnzipFolder.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/POW_Wfactory.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/__init__.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owMarkdown.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/ow_in_or_out_path.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/ow_widget_random_data.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owaccumulator.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owaddcolumns.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owapplyrules.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owchunking.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owconcatrules.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owconversellm.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owembeddings.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owemptyswitch.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owendloop.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owexecutescript.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owexecutescript_TEST.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owextrachunks.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owfilemetadata.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owfilesyncchecker.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owfilewithpath.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owfindfilesfromdir.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owfusion_nm.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owgenerate_word.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owgeneratequestions.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owgeneratesynthesis.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owkeyword.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owkeywordsdetection.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owlangdetect.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owlargelanguagemodel.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owlemmatizer.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owllm4all.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owloaddocuments.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owloadworkflow.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_ce_minilml6.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_falcon.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_en_fr.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_fr_en.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_mistral.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_mpnet.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_2.5_32b.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_1.5b_q6.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_3b_q4.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_7b_q4.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_7b_q6.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwencoder_7b.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_solar.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_solar_uncensored.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_en.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_fr.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/ownumberpointinrules.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owprocessdocuments.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owreranking.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owsavewithpath.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owselect_column_dynamic.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owselect_row_dynamic.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owsortandselect.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owstartloop.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owtable2corpus.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owtranslation.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owtrigger.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owunzipfolder.ui +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/CN2RuleViewer.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/MDViewer.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/Mistral.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/apply_rules.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/blue_down_arrow.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/category.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/dark_green.txt +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/de.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/document_generator.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/documents.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/edge_llm.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/endloop.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/extra_chunks.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/green_check.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/in_or_out.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/input.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/languages.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/lm_studio.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/local_interf_img_multi_pull.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/local_interf_multi_pull.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/local_interf_pull.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/local_interf_push.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/local_interf_text_pull.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/logo_solar.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/logo_uncensoredsolar.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/logo_upload.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/models.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/operationSystem.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/optimisation.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/optimizer.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/output.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owCN2_intersect_rules.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owaccumulator.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owchunking.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owconversellm.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owedittable.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owembeddings.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owemptyswitch.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owenvinfo.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owexecutescript.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owextracttokens.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owfilemetadata.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owfilesfromdir.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owfilesyncchecker.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owfilewithpath.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owfusion_nm.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owgeneratequestions.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owgeneratesynthesis.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owkeywords.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owkeywordsdetection.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owlargelanguagemodel.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owlemmatizer.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owloaddocuments.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_ce_minilml6.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_falcon.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_en_fr.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_fr_en.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_mpnet.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_en.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_fr.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owoptimisation.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owoptimisationselection.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owqueryllm.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owreranking.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owsavefilepathentry.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owselectcolumndynamique.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owsortandselect.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owtable2corpus.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owtranslation.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owtrigger.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/processdocuments.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/qwen-color.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/select_dynamic_row.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/startloop.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/tools.png +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/widgetFactory.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/zip.svg +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/__init__.py +0 -0
- {aait-2.3.12 → aait-2.3.12.1}/setup.cfg +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
License.txt
|
|
2
|
-
setup.cfg
|
|
3
2
|
setup.py
|
|
4
3
|
aait.egg-info/PKG-INFO
|
|
5
4
|
aait.egg-info/SOURCES.txt
|
|
@@ -40,6 +39,7 @@ orangecontrib/AAIT/utils/shared_variables.py
|
|
|
40
39
|
orangecontrib/AAIT/utils/subprocess_management.py
|
|
41
40
|
orangecontrib/AAIT/utils/thread_management.py
|
|
42
41
|
orangecontrib/AAIT/utils/unlink_table_domain.py
|
|
42
|
+
orangecontrib/AAIT/utils/widget_positioning.py
|
|
43
43
|
orangecontrib/AAIT/utils/windows_utils.py
|
|
44
44
|
orangecontrib/AAIT/utils/tools/__init__.py
|
|
45
45
|
orangecontrib/AAIT/utils/tools/change_owcorpus.py
|
|
@@ -80,6 +80,7 @@ orangecontrib/AAIT/widgets/OWLargeLanguageModel.py
|
|
|
80
80
|
orangecontrib/AAIT/widgets/OWLemmatizer.py
|
|
81
81
|
orangecontrib/AAIT/widgets/OWLoadDocuments.py
|
|
82
82
|
orangecontrib/AAIT/widgets/OWModel_CE_MiniLML6.py
|
|
83
|
+
orangecontrib/AAIT/widgets/OWModel_Embeddings.py
|
|
83
84
|
orangecontrib/AAIT/widgets/OWModel_Falcon.py
|
|
84
85
|
orangecontrib/AAIT/widgets/OWModel_HelsinkiEnFr.py
|
|
85
86
|
orangecontrib/AAIT/widgets/OWModel_HelsinkiFrEn.py
|
|
@@ -114,6 +115,8 @@ orangecontrib/AAIT/widgets/OWTrigger.py
|
|
|
114
115
|
orangecontrib/AAIT/widgets/OWUnzipFolder.py
|
|
115
116
|
orangecontrib/AAIT/widgets/POW_Wfactory.py
|
|
116
117
|
orangecontrib/AAIT/widgets/__init__.py
|
|
118
|
+
orangecontrib/AAIT/widgets/owautoshowcreateinstance.py
|
|
119
|
+
orangecontrib/AAIT/widgets/owautoshowtable.py
|
|
117
120
|
orangecontrib/AAIT/widgets/designer/owMarkdown.ui
|
|
118
121
|
orangecontrib/AAIT/widgets/designer/ow_OperationSystem.ui
|
|
119
122
|
orangecontrib/AAIT/widgets/designer/ow_in_or_out_path.ui
|
|
@@ -179,8 +182,10 @@ orangecontrib/AAIT/widgets/designer/owtranslation.ui
|
|
|
179
182
|
orangecontrib/AAIT/widgets/designer/owtrigger.ui
|
|
180
183
|
orangecontrib/AAIT/widgets/designer/owunzipfolder.ui
|
|
181
184
|
orangecontrib/AAIT/widgets/icons/CN2RuleViewer.svg
|
|
185
|
+
orangecontrib/AAIT/widgets/icons/CreateInstance.svg
|
|
182
186
|
orangecontrib/AAIT/widgets/icons/MDViewer.png
|
|
183
187
|
orangecontrib/AAIT/widgets/icons/Mistral.png
|
|
188
|
+
orangecontrib/AAIT/widgets/icons/Table.svg
|
|
184
189
|
orangecontrib/AAIT/widgets/icons/apply_rules.svg
|
|
185
190
|
orangecontrib/AAIT/widgets/icons/blue_down_arrow.svg
|
|
186
191
|
orangecontrib/AAIT/widgets/icons/category.svg
|
|
@@ -232,6 +237,7 @@ orangecontrib/AAIT/widgets/icons/owlargelanguagemodel.svg
|
|
|
232
237
|
orangecontrib/AAIT/widgets/icons/owlemmatizer.svg
|
|
233
238
|
orangecontrib/AAIT/widgets/icons/owloaddocuments.svg
|
|
234
239
|
orangecontrib/AAIT/widgets/icons/owmodel_ce_minilml6.svg
|
|
240
|
+
orangecontrib/AAIT/widgets/icons/owmodel_embeddings.svg
|
|
235
241
|
orangecontrib/AAIT/widgets/icons/owmodel_falcon.png
|
|
236
242
|
orangecontrib/AAIT/widgets/icons/owmodel_helsinki_en_fr.svg
|
|
237
243
|
orangecontrib/AAIT/widgets/icons/owmodel_helsinki_fr_en.svg
|
|
@@ -4,24 +4,24 @@ from packaging import version
|
|
|
4
4
|
import sys
|
|
5
5
|
import re
|
|
6
6
|
import os
|
|
7
|
-
def check_executable_path():
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if not check_executable_path():
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
# def check_executable_path():
|
|
8
|
+
# exe = sys.executable
|
|
9
|
+
#
|
|
10
|
+
# # caractères spéciaux interdits (tu peux en ajouter)
|
|
11
|
+
# forbidden = r'[^A-Za-z0-9_\-./:\\]' # tout ce qui n'est PAS ce set
|
|
12
|
+
# pattern = re.compile(forbidden)
|
|
13
|
+
#
|
|
14
|
+
# if " " in exe or pattern.search(exe):
|
|
15
|
+
# return False
|
|
16
|
+
# return True
|
|
17
|
+
#
|
|
18
|
+
# if not check_executable_path():
|
|
19
|
+
# if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
20
|
+
# from orangecontrib.AAIT.utils import SimpleDialogQt
|
|
21
|
+
# else:
|
|
22
|
+
# from orangecontrib.AAIT.utils import SimpleDialogQt
|
|
23
|
+
# SimpleDialogQt.BoxError("You must install this program in a path that does not contain spaces or special characters.")
|
|
24
|
+
# exit(0)
|
|
25
25
|
|
|
26
26
|
def check_executable_length(max_length=260):
|
|
27
27
|
exe = sys.executable
|
|
@@ -97,6 +97,14 @@ def check_gpu(model_path, argself):
|
|
|
97
97
|
return
|
|
98
98
|
|
|
99
99
|
|
|
100
|
+
def count_tokens(model: Llama, text: str) -> int:
|
|
101
|
+
"""
|
|
102
|
+
Count the number of tokens in a text, for a chosen model.
|
|
103
|
+
"""
|
|
104
|
+
tokens = model.tokenize(text.encode("utf-8"))
|
|
105
|
+
return len(tokens)
|
|
106
|
+
|
|
107
|
+
|
|
100
108
|
def load_model(model_path, use_gpu, n_ctx=10000):
|
|
101
109
|
"""
|
|
102
110
|
Charge un modèle GGUF avec llama_cpp.Llama.
|
|
@@ -126,7 +134,7 @@ def load_model(model_path, use_gpu, n_ctx=10000):
|
|
|
126
134
|
use_mmap=True,
|
|
127
135
|
use_mlock=False,
|
|
128
136
|
embedding=False,
|
|
129
|
-
verbose=False
|
|
137
|
+
verbose=True, #hahahahahaha remettre a False
|
|
130
138
|
)
|
|
131
139
|
return model
|
|
132
140
|
except Exception as e:
|
|
@@ -134,7 +142,7 @@ def load_model(model_path, use_gpu, n_ctx=10000):
|
|
|
134
142
|
return
|
|
135
143
|
|
|
136
144
|
|
|
137
|
-
def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, query_parameters=None, workflow_id="", progress_callback=None
|
|
145
|
+
def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, query_parameters=None, workflow_id="", progress_callback=None):
|
|
138
146
|
"""
|
|
139
147
|
Identique en signature/comportement, mais utilise llama_cpp sous le capot.
|
|
140
148
|
"""
|
|
@@ -146,7 +154,8 @@ def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, query_paramet
|
|
|
146
154
|
|
|
147
155
|
# Chargement modèle (llama_cpp)
|
|
148
156
|
model = load_model(model_path=model_path, use_gpu=use_gpu, n_ctx=n_ctx)
|
|
149
|
-
|
|
157
|
+
if model is None:
|
|
158
|
+
return None
|
|
150
159
|
# Paramètres de génération par défaut
|
|
151
160
|
if query_parameters is None:
|
|
152
161
|
query_parameters = {"max_tokens": 4096, "temperature": 0.4, "top_p": 0.4, "top_k": 40, "repeat_penalty": 1.15}
|
|
@@ -185,8 +194,8 @@ def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, query_paramet
|
|
|
185
194
|
|
|
186
195
|
if answer == "":
|
|
187
196
|
answer = (
|
|
188
|
-
"Error: The answer could not be generated.
|
|
189
|
-
f"
|
|
197
|
+
"Error: The answer could not be generated. Your prompt might be too long, or the model architecture you tried to use is possibly "
|
|
198
|
+
f"not supported yet.\n\nModel name: {ntpath.basename(model_path)}"
|
|
190
199
|
)
|
|
191
200
|
|
|
192
201
|
thinking = ""
|
|
@@ -203,7 +212,7 @@ def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, query_paramet
|
|
|
203
212
|
|
|
204
213
|
if argself is not None and getattr(argself, "stop", False):
|
|
205
214
|
break
|
|
206
|
-
except
|
|
215
|
+
except Exception as e:
|
|
207
216
|
print("An error occurred when trying to generate an answer:", e)
|
|
208
217
|
return
|
|
209
218
|
|
|
@@ -278,7 +287,7 @@ def run_query(prompt, model, max_tokens=4096, temperature=0, top_p=0, top_k=40,
|
|
|
278
287
|
# - On utilise create_completion (prompt-style) pour rester compatible avec ton templating actuel.
|
|
279
288
|
# - Le générateur renvoie des chunks contenant choices[0].text.
|
|
280
289
|
try:
|
|
281
|
-
stream = model
|
|
290
|
+
stream = model(prompt=prompt, **gen_kwargs)
|
|
282
291
|
|
|
283
292
|
for chunk in stream:
|
|
284
293
|
# Récupérer le texte incrémental
|
|
@@ -314,63 +323,112 @@ def run_query(prompt, model, max_tokens=4096, temperature=0, top_p=0, top_k=40,
|
|
|
314
323
|
return answer
|
|
315
324
|
|
|
316
325
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
#
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
#
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
#
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
#
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
#
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
#
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
#
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
326
|
+
def generate_conversation(table, model, conversation=None, progress_callback=None, argself=None):
|
|
327
|
+
"""
|
|
328
|
+
Generates a response using a language model and appends it to a conversation.
|
|
329
|
+
|
|
330
|
+
Parameters:
|
|
331
|
+
----------
|
|
332
|
+
table (Orange.data.Table) Input data table. The first row should contain at least a "prompt" column, and optionally
|
|
333
|
+
"system prompt" and "assistant prompt" columns for context.
|
|
334
|
+
model (Llama) : Loaded language model instance, compatible with GPT4All or llama.cpp-style interfaces.
|
|
335
|
+
widget (OWConverseLLM) : The widget in which to display the conversation.
|
|
336
|
+
conversation (list, optional) : Existing conversation string to append the new response to. Defaults to an empty string.
|
|
337
|
+
progress_callback (callable, optional) : Callback function for UI updates during generation. Called with progress percentage and message.
|
|
338
|
+
argself (object, optional) : Extra argument passed to `run_query`, typically the widget instance (used for context or settings).
|
|
339
|
+
|
|
340
|
+
Returns:
|
|
341
|
+
-------
|
|
342
|
+
Orange.data.Table
|
|
343
|
+
A new Orange Table containing the original input row with two new meta columns:
|
|
344
|
+
- "Answer": the model's generated response.
|
|
345
|
+
- "Conversation": the updated full conversation string.
|
|
346
|
+
"""
|
|
347
|
+
if table is None:
|
|
348
|
+
return
|
|
349
|
+
|
|
350
|
+
# Copy the input data
|
|
351
|
+
data = copy.deepcopy(table)
|
|
352
|
+
L = len(data)
|
|
353
|
+
|
|
354
|
+
# Get data from the first row of the Data Table
|
|
355
|
+
system_prompt = data[0]["system prompt"].value if "system prompt" in data.domain else ""
|
|
356
|
+
user_prompt = data[0]["prompt"].value
|
|
357
|
+
assistant_prompt = data[0]["assistant prompt"].value if "assistant prompt" in data.domain else ""
|
|
358
|
+
|
|
359
|
+
# Get model path to determine prompt template
|
|
360
|
+
model_path = model.model_path
|
|
361
|
+
|
|
362
|
+
prompt = ""
|
|
363
|
+
# If the conversation has not started, add a default system prompt
|
|
364
|
+
if not conversation:
|
|
365
|
+
prompt += prompt_management.apply_system_template(model_path=model_path, system_prompt=system_prompt)
|
|
366
|
+
conversation = []
|
|
367
|
+
|
|
368
|
+
# If the conversation has started, build the complete context
|
|
369
|
+
else:
|
|
370
|
+
for message in conversation:
|
|
371
|
+
if message["role"] == "user":
|
|
372
|
+
prompt += prompt_management.apply_user_template(model_path, message["content"])
|
|
373
|
+
elif message["role"] == "assistant":
|
|
374
|
+
prompt += prompt_management.apply_assistant_template(model_path, message["content"])
|
|
375
|
+
elif message["role"] == "system":
|
|
376
|
+
prompt += prompt_management.apply_system_template(model_path, message["content"])
|
|
377
|
+
|
|
378
|
+
# Add the current user prompt & assistant prompt
|
|
379
|
+
prompt += prompt_management.apply_user_template(model_path, user_prompt)
|
|
380
|
+
prompt += prompt_management.apply_assistant_template(model_path, assistant_prompt)
|
|
381
|
+
|
|
382
|
+
# Return progression to fill the user & assistant cards
|
|
383
|
+
progress_callback(("user", user_prompt))
|
|
384
|
+
progress_callback((None, assistant_prompt))
|
|
385
|
+
|
|
386
|
+
# Append the user message to the conversation
|
|
387
|
+
conversation.append({"role": "user", "content": user_prompt})
|
|
388
|
+
|
|
389
|
+
# Generate the answer
|
|
390
|
+
answer = run_query(prompt, model=model, argself=argself, progress_callback=progress_callback)
|
|
391
|
+
|
|
392
|
+
# Split the thinking block and remove it from the answer
|
|
393
|
+
think_text, final_answer = split_think(answer=answer)
|
|
394
|
+
|
|
395
|
+
# Append the answer to the conversation
|
|
396
|
+
conversation.append({"role": "assistant", "content": assistant_prompt + final_answer})
|
|
397
|
+
|
|
398
|
+
# Add spaces to the widget for following answers
|
|
399
|
+
progress_callback((100, ""))
|
|
400
|
+
|
|
401
|
+
# Padding to add columns to the table, TEMPORARY # TODO : process the entire table for conversation
|
|
402
|
+
rows_answer = [final_answer]
|
|
403
|
+
rows_answer += [""] * (L - len(rows_answer))
|
|
404
|
+
rows_think = [think_text]
|
|
405
|
+
rows_think += [""] * (L - len(rows_think))
|
|
406
|
+
rows_conv = ["To be implemented"]
|
|
407
|
+
rows_conv += [""] * (L - len(rows_conv))
|
|
408
|
+
|
|
409
|
+
# Generate new Domain to add to data
|
|
410
|
+
var_answer = StringVariable("Answer")
|
|
411
|
+
var_conversation = StringVariable("Conversation")
|
|
412
|
+
var_think = StringVariable("Think")
|
|
413
|
+
|
|
414
|
+
# Add columns to the table
|
|
415
|
+
data = data.add_column(var_answer, rows_answer, to_metas=True)
|
|
416
|
+
data = data.add_column(var_conversation, rows_conv, to_metas=True)
|
|
417
|
+
data = data.add_column(var_think, rows_think, to_metas=True)
|
|
418
|
+
|
|
419
|
+
return data, conversation
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
def split_think(answer: str):
|
|
423
|
+
# Extract think content (if any)
|
|
424
|
+
think_match = re.search(r"<think>(.*?)</think>", answer, flags=re.DOTALL)
|
|
425
|
+
think_text = think_match.group(1).strip() if think_match else ""
|
|
426
|
+
# Remove think block from the final answer
|
|
427
|
+
final_answer = re.sub(r"<think>.*?</think>", "", answer, flags=re.DOTALL).strip()
|
|
428
|
+
return think_text, final_answer
|
|
429
|
+
|
|
430
|
+
def conversation_to_text(conversation):
|
|
431
|
+
if not conversation:
|
|
432
|
+
return ""
|
|
433
|
+
else:
|
|
434
|
+
pass #TODO
|
|
@@ -192,10 +192,10 @@ def extract_text(filepath):
|
|
|
192
192
|
return extract_text_from_pdf(filepath)
|
|
193
193
|
elif file_extension == ".docx":
|
|
194
194
|
return extract_text_from_docx(filepath)
|
|
195
|
-
elif file_extension in [".txt", ".md"]:
|
|
195
|
+
elif file_extension in [".txt", ".md", ".py", ".html", ".json", ".ows"]:
|
|
196
196
|
return extract_text_from_txt(filepath)
|
|
197
197
|
else:
|
|
198
|
-
return "ERROR: Unsupported file format. Please use a .pdf, .docx, .txt, or .
|
|
198
|
+
return "ERROR: Unsupported file format. Please use a .pdf, .docx, .txt, .md, .py, .html, .ows or .json file."
|
|
199
199
|
except Exception as e:
|
|
200
200
|
print(f"Erreur lors de l'extraction de texte depuis {filepath}: {e}")
|
|
201
201
|
return f"ERROR: Extraction Error ({e})"
|
|
@@ -127,9 +127,13 @@ def open_terminal(command, with_qt=True, env=None):
|
|
|
127
127
|
|
|
128
128
|
if sys.platform.startswith("win"):
|
|
129
129
|
# j insere cmd /k command
|
|
130
|
-
command.insert(0,"/k")
|
|
131
|
-
command.insert(0, "cmd.exe")
|
|
132
|
-
process = subprocess.Popen(command, env=env,creationflags=subprocess.CREATE_NEW_CONSOLE)
|
|
130
|
+
# command.insert(0,"/k")
|
|
131
|
+
# command.insert(0, "cmd.exe")
|
|
132
|
+
# process = subprocess.Popen(command, env=env,creationflags=subprocess.CREATE_NEW_CONSOLE)
|
|
133
|
+
process = subprocess.Popen(command,env=env,creationflags=subprocess.CREATE_NEW_CONSOLE)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
133
137
|
if process:
|
|
134
138
|
return process.pid
|
|
135
139
|
else:
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
from AnyQt.QtWidgets import QApplication
|
|
2
|
+
from AnyQt.QtCore import QTimer
|
|
3
|
+
#allows displaying a widget on opening
|
|
4
|
+
# add (not sure!)
|
|
5
|
+
# save_position = False
|
|
6
|
+
# after class declaration
|
|
7
|
+
# call show_and_adjust_at_opening at the end of init
|
|
8
|
+
def show_and_adjust_at_opening(argself,str_position):
|
|
9
|
+
# "left", "top-left", "bottom-left","bottom", "bottom-left", "bottom-right"
|
|
10
|
+
str_position=str(str_position)
|
|
11
|
+
if str_position=="None":
|
|
12
|
+
return
|
|
13
|
+
argself.show()
|
|
14
|
+
QTimer.singleShot(1000, lambda: adjust_to_quarter(argself,str_position))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def adjust_to_quarter(argself, position: str):
|
|
18
|
+
"""
|
|
19
|
+
Resize and position the widget depending on a screen region:
|
|
20
|
+
- left / right → full height, half width
|
|
21
|
+
- top / bottom → full width, half height
|
|
22
|
+
- corners → quarter (half width × half height)
|
|
23
|
+
"""
|
|
24
|
+
app = QApplication.instance()
|
|
25
|
+
screen = app.primaryScreen().availableGeometry()
|
|
26
|
+
|
|
27
|
+
sw, sh = screen.width(), screen.height()
|
|
28
|
+
|
|
29
|
+
# ---- CALCUL TAILLE ----
|
|
30
|
+
if position in ("left", "right"):
|
|
31
|
+
# full height, half width
|
|
32
|
+
w, h = sw // 2, sh
|
|
33
|
+
|
|
34
|
+
elif position in ("top", "bottom"):
|
|
35
|
+
# full width, half height
|
|
36
|
+
w, h = sw, sh // 2
|
|
37
|
+
|
|
38
|
+
elif position in ("top-left", "top-right", "bottom-left", "bottom-right"):
|
|
39
|
+
# quarter (default case)
|
|
40
|
+
w, h = sw // 2, sh // 2
|
|
41
|
+
|
|
42
|
+
else:
|
|
43
|
+
# fallback: centered
|
|
44
|
+
w, h = sw // 2, sh // 2
|
|
45
|
+
|
|
46
|
+
# ---- CALCUL POSITION ----
|
|
47
|
+
if position in ("left", "top-left", "bottom-left"):
|
|
48
|
+
x = screen.x()
|
|
49
|
+
elif position in ("right", "top-right", "bottom-right"):
|
|
50
|
+
x = screen.x() + sw - w
|
|
51
|
+
else:
|
|
52
|
+
x = screen.x() + (sw - w) // 2
|
|
53
|
+
|
|
54
|
+
if position in ("top", "top-left", "top-right"):
|
|
55
|
+
y = screen.y()
|
|
56
|
+
elif position in ("bottom", "bottom-left", "bottom-right"):
|
|
57
|
+
y = screen.y() + sh - h
|
|
58
|
+
else:
|
|
59
|
+
y = screen.y() + (sh - h) // 2
|
|
60
|
+
|
|
61
|
+
# ---- APPLIQUER ----
|
|
62
|
+
argself.resize(w, h)
|
|
63
|
+
argself.move(x, y)
|
|
64
|
+
|
|
@@ -30,7 +30,7 @@ except Exception: # pragma: no cover
|
|
|
30
30
|
@apply_modification_from_python_file(filepath_original_widget=__file__)
|
|
31
31
|
class OWAddColumns(widget.OWWidget):
|
|
32
32
|
name = "Add columns"
|
|
33
|
-
description = "
|
|
33
|
+
description = "Add selected columns (OS/Python/Orange/packages, etc.) to an input Table."
|
|
34
34
|
category = "AAIT - TOOLBOX"
|
|
35
35
|
icon = "icons/owenvinfo.png"
|
|
36
36
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
@@ -38,6 +38,12 @@ from orangecanvas.gui.utils import disconnected
|
|
|
38
38
|
from orangewidget.utils.listview import ListViewSearch
|
|
39
39
|
|
|
40
40
|
from orangecontrib.text.corpus import Corpus
|
|
41
|
+
from Orange.widgets.settings import Setting
|
|
42
|
+
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
43
|
+
from Orange.widgets.orangecontrib.AAIT.utils import widget_positioning
|
|
44
|
+
else:
|
|
45
|
+
from orangecontrib.AAIT.utils import widget_positioning
|
|
46
|
+
|
|
41
47
|
|
|
42
48
|
HTML = """
|
|
43
49
|
<!doctype html>
|
|
@@ -286,15 +292,20 @@ class OWCorpusViewer(OWWidget, ConcurrentWidgetMixin):
|
|
|
286
292
|
icon = "icons_dev/MDViewer.png"
|
|
287
293
|
priority = 1002
|
|
288
294
|
keywords = "Markdown viewer, display"
|
|
295
|
+
#save_position = False
|
|
296
|
+
|
|
297
|
+
|
|
289
298
|
|
|
290
299
|
class Inputs:
|
|
291
300
|
corpus = Input("Corpus", Corpus, replaces=["Data"])
|
|
292
|
-
|
|
301
|
+
input_autoshow = Input("AutoShowConfiguration", str, auto_summary=False)
|
|
293
302
|
class Outputs:
|
|
294
303
|
matching_docs = Output("Matching Docs", Corpus, default=True)
|
|
295
304
|
other_docs = Output("Other Docs", Corpus)
|
|
296
305
|
corpus = Output("Corpus", Corpus)
|
|
297
306
|
|
|
307
|
+
|
|
308
|
+
str_WidgetPositionning: str=Setting("None")
|
|
298
309
|
settingsHandler = DomainContextHandler()
|
|
299
310
|
|
|
300
311
|
settings_version = 2
|
|
@@ -384,6 +395,8 @@ class OWCorpusViewer(OWWidget, ConcurrentWidgetMixin):
|
|
|
384
395
|
if not is_qt_offscreen():
|
|
385
396
|
self.doc_webview = gui.WebviewWidget(self.splitter, debug=False)
|
|
386
397
|
self.mainArea.layout().addWidget(self.splitter)
|
|
398
|
+
widget_positioning.show_and_adjust_at_opening(self,str(self.str_WidgetPositionning))
|
|
399
|
+
|
|
387
400
|
|
|
388
401
|
def copy_to_clipboard(self):
|
|
389
402
|
if self.doc_webview is not None:
|
|
@@ -408,6 +421,14 @@ class OWCorpusViewer(OWWidget, ConcurrentWidgetMixin):
|
|
|
408
421
|
self.show_docs()
|
|
409
422
|
self.commit.now()
|
|
410
423
|
|
|
424
|
+
@Inputs.input_autoshow
|
|
425
|
+
def set_input_autoshow(self, le_str):
|
|
426
|
+
if le_str is not None:
|
|
427
|
+
self.str_WidgetPositionning=str(le_str)
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
411
432
|
def reset_widget(self):
|
|
412
433
|
# Corpus
|
|
413
434
|
self.corpus = None
|
|
@@ -4,11 +4,13 @@ import sys
|
|
|
4
4
|
from Orange.data import Table, Domain, StringVariable
|
|
5
5
|
from AnyQt.QtWidgets import QApplication
|
|
6
6
|
from Orange.widgets import widget
|
|
7
|
+
from Orange.widgets.settings import Setting
|
|
7
8
|
from Orange.widgets.utils.signals import Input, Output
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
11
12
|
from Orange.widgets.orangecontrib.AAIT.utils.import_uic import uic
|
|
13
|
+
from Orange.widgets.orangecontrib.AAIT.utils import base_widget
|
|
12
14
|
from Orange.widgets.orangecontrib.AAIT.utils.initialize_from_ini import apply_modification_from_python_file
|
|
13
15
|
else:
|
|
14
16
|
from orangecontrib.AAIT.utils.import_uic import uic
|
|
@@ -16,7 +18,7 @@ else:
|
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
@apply_modification_from_python_file(filepath_original_widget=__file__)
|
|
19
|
-
class OWExtractTokens(
|
|
21
|
+
class OWExtractTokens(base_widget.BaseListWidget):
|
|
20
22
|
name = "Extract Tokens"
|
|
21
23
|
description = "This widget extracts the tokens from your input data."
|
|
22
24
|
category = "AAIT - LLM INTEGRATION"
|
|
@@ -26,6 +28,7 @@ class OWExtractTokens(widget.OWWidget):
|
|
|
26
28
|
gui = os.path.join(os.path.dirname(os.path.abspath(__file__)), "designer/owextracttokens.ui")
|
|
27
29
|
want_control_area = False
|
|
28
30
|
priority = 1060
|
|
31
|
+
selected_column_name = Setting("")
|
|
29
32
|
|
|
30
33
|
class Inputs:
|
|
31
34
|
data = Input("Data", Table)
|
|
@@ -37,6 +40,9 @@ class OWExtractTokens(widget.OWWidget):
|
|
|
37
40
|
@Inputs.data
|
|
38
41
|
def set_data(self, in_data):
|
|
39
42
|
self.data = in_data
|
|
43
|
+
if self.data:
|
|
44
|
+
self.var_selector.add_variables(self.data.domain)
|
|
45
|
+
self.var_selector.select_variable_by_name(self.selected_column_name)
|
|
40
46
|
if self.autorun:
|
|
41
47
|
self.run()
|
|
42
48
|
|
|
@@ -44,7 +50,7 @@ class OWExtractTokens(widget.OWWidget):
|
|
|
44
50
|
super().__init__()
|
|
45
51
|
# Qt Management
|
|
46
52
|
self.setFixedWidth(470)
|
|
47
|
-
self.setFixedHeight(
|
|
53
|
+
self.setFixedHeight(600)
|
|
48
54
|
uic.loadUi(self.gui, self)
|
|
49
55
|
|
|
50
56
|
# Data Management
|
|
@@ -61,6 +67,10 @@ class OWExtractTokens(widget.OWWidget):
|
|
|
61
67
|
self.Outputs.data_column.send(None)
|
|
62
68
|
return
|
|
63
69
|
|
|
70
|
+
if not self.selected_column_name in self.data.domain:
|
|
71
|
+
self.warning(f'Previously selected column "{self.selected_column_name}" does not exist in your data.')
|
|
72
|
+
return
|
|
73
|
+
|
|
64
74
|
if not hasattr(self.data, "tokens"):
|
|
65
75
|
self.Outputs.data_row.send(self.data)
|
|
66
76
|
self.Outputs.data_column.send(self.data)
|
|
@@ -34,7 +34,7 @@ class OWFusionNN(widget.OWWidget):
|
|
|
34
34
|
"""Fusion NxM simplifiée avec gestion correcte des types Orange."""
|
|
35
35
|
|
|
36
36
|
name = "Fusion NxM"
|
|
37
|
-
description = "
|
|
37
|
+
description = "Merge two Tables on a key; add the non-matched rows."
|
|
38
38
|
category = "AAIT - TOOLBOX"
|
|
39
39
|
icon = "icons/owfusion_nm.png"
|
|
40
40
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
@@ -29,7 +29,7 @@ class OWDocumentGenerator(widget.OWWidget):
|
|
|
29
29
|
- Input 3 : Tables à insérer (nom = balise cible)
|
|
30
30
|
"""
|
|
31
31
|
name = "Document Generator"
|
|
32
|
-
description = "
|
|
32
|
+
description = "Generate Word documents with replacements and tables."
|
|
33
33
|
category = "AAIT - TOOLBOX"
|
|
34
34
|
icon = "icons/document_generator.png"
|
|
35
35
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
@@ -40,7 +40,7 @@ class OWQEdgeLLM(widget.OWWidget):
|
|
|
40
40
|
class Outputs:
|
|
41
41
|
data = Output("Data", Orange.data.Table)
|
|
42
42
|
|
|
43
|
-
n_ctx: str = Setting("
|
|
43
|
+
n_ctx: str = Setting("32768")
|
|
44
44
|
workflow_id = Setting("")
|
|
45
45
|
|
|
46
46
|
max_tokens = Setting(4096)
|
|
@@ -148,6 +148,10 @@ class OWQEdgeLLM(widget.OWWidget):
|
|
|
148
148
|
if not "prompt" in self.data.domain:
|
|
149
149
|
return
|
|
150
150
|
|
|
151
|
+
if "Answer" in self.data.domain:
|
|
152
|
+
self.error('You cannot have "Answer" in your input data. Please rename or remove the column.')
|
|
153
|
+
return
|
|
154
|
+
|
|
151
155
|
answers_llama.check_gpu(self.model_path, self)
|
|
152
156
|
if not self.can_run:
|
|
153
157
|
return
|
|
@@ -188,6 +192,10 @@ class OWQEdgeLLM(widget.OWWidget):
|
|
|
188
192
|
self.textBrowser.insertPlainText(text)
|
|
189
193
|
|
|
190
194
|
def handle_result(self, result):
|
|
195
|
+
if result is None:
|
|
196
|
+
self.error("unable to load model")
|
|
197
|
+
self.Outputs.data.send(None)
|
|
198
|
+
return
|
|
191
199
|
try:
|
|
192
200
|
self.result = result
|
|
193
201
|
self.Outputs.data.send(result)
|