aait 0.0.4.76__tar.gz → 0.0.4.78__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-0.0.4.76 → aait-0.0.4.78}/PKG-INFO +3 -2
- {aait-0.0.4.76 → aait-0.0.4.78}/aait.egg-info/PKG-INFO +3 -2
- {aait-0.0.4.76 → aait-0.0.4.78}/aait.egg-info/requires.txt +6 -1
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/answers.py +8 -6
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/chunking.py +9 -15
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/quickpy.py +5 -3
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/start_workflow.py +2 -2
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/MetManagement.py +9 -2
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWChunking.py +0 -1
- aait-0.0.4.78/orangecontrib/AAIT/widgets/OWInputSelector.py +257 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWQueryLLM.py +20 -3
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owqueryllm.ui +19 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/setup.py +24 -5
- aait-0.0.4.76/orangecontrib/AAIT/widgets/OWInputSelector.py +0 -143
- {aait-0.0.4.76 → aait-0.0.4.78}/License.txt +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/aait.egg-info/SOURCES.txt +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/aait.egg-info/dependency_links.txt +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/aait.egg-info/entry_points.txt +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/aait.egg-info/namespace_packages.txt +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/aait.egg-info/top_level.txt +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/__init__.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/SignalReceiver.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/__init__.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/audit_widget.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (2).TIF +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (3).TIF +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (4).TIF +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0001.csv +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0002.csv +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0003.csv +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/dynamic_results.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/test_all_widgets.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/test_server.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/widget_4all.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/widget_chunking.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/widget_edit_table.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/widget_mpnet_create_embeddings.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/widget_optimisation.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/widget_optimisationselection.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/widget_powfactory.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/widget_queryllm.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/widget_spacy_md_fr_lemmatizer.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/widget_traduction.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/audit_widget/widgets_model.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/encapsulation/__init__.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/fix_torch/fix_torch_dll_error.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/fix_torch/libomp140.x86_64.dll +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/GPT4ALL.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/GPT4ALL_killer.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/MergeBaseLora.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/Tutorial_Finetuning.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/Tutorial_TestFinetuning.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/__init__.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/embeddings.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/finetuning.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/functions_DatasetGeneration.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/functions_Finetuning.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/lemmes.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/lmstudio.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/main_DatasetGeneration.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/main_Finetuning.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/process_documents.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/prompt_management.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/server_requests.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/test.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/test_functions.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/llm/translations.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/optimiser/__init__.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/optimiser/optuna_multi.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/CheckMetaData.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/SimpleDialogQt.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/__init__.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/aait_repo_file.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/check_data_in.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/delta_local_shared_fodler.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/import_uic.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/initialize_from_ini.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/shared_functions.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/shared_variables.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/subprocess_management.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/thread_management.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/tools/__init__.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/tools/change_owcorpus.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/tools/concat_splitted_pypi.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/tools/first_time_check.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/tools/owcorpus_ok.txt +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/utils/windows_utils.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWAAITResourcesManager.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWAAITResourcesManager_Theo.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWApplyRules.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWCN2rule_view.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWConcatRules.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWConverseLLM.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWCreateEmbeddings.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWDisplayMD.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWEditTable.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWEndLoop.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWExtraChunks.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWGenerateQuestions.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWGenerateSynthesis.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWKeywords.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWLLM4ALL.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWLMStudio.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWLanguageDetection.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWLemmatizer.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_Falcon.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_HelsinkiEnFr.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_HelsinkiFrEn.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_MPNET.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_Mistral.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_Qwen.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_Qwen1B5_Q6.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_Qwen3B_Q4.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q4.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q6.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_Solar.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_SolarUncensored.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_EN.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_FR.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWOptimisation.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWOptimisationSelection.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWOptimisationSendScore.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWProcessDocumentsFromPath.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWRandomData.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWSaveFilepathEntry.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWStartLoop.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWTable2Corpus.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWTranslation.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/OWTrigger.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/POW_Wfactory.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/__init__.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owMarkdown.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/ow_in_or_out_path.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/ow_widget_random_data.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owapplyrules.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owchunking.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owconcatrules.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owconversellm.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owembeddings.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owendloop.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owextrachunks.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owgeneratequestions.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owgeneratesynthesis.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owkeyword.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owlangdetect.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owlemmatizer.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owllm4all.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owloadworkflow.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owmodel_falcon.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_en_fr.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_fr_en.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owmodel_mistral.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owmodel_mpnet.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owmodel_qwen.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owmodel_solar.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owmodel_solar_uncensored.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_en.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_fr.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/ownumberpointinrules.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owprocessdocuments.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owstartloop.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owtable2corpus.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owtranslation.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/designer/owtrigger.ui +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/CN2RuleViewer.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/MDViewer.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/Mistral.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/apply_rules.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/category.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/dark_green.txt +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/de.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/documents.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/endloop.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/extra_chunks.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/in_or_out.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/keyword.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/languages.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/llm4all.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/lm_studio.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/local_interf_img_multi_pull.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/local_interf_multi_pull.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/local_interf_pull.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/local_interf_push.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/local_interf_text_pull.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/logo_solar.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/logo_uncensoredsolar.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/logo_upload.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/optimisation.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owCN2_intersect_rules.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owchunking.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owconversellm.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owedittable.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owembeddings.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owgeneratequestions.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owgeneratesynthesis.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owlemmatizer.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owmodel_falcon.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_en_fr.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_fr_en.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owmodel_mpnet.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_en.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_fr.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owoptimisation.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owoptimisationselection.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owqueryllm.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owsavefilepathentry.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owtable2corpus.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owtranslation.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/owtrigger.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/processdocuments.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/qwen-color.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/startloop.png +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/AAIT/widgets/icons/widgetFactory.svg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/orangecontrib/__init__.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/setup.cfg +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/tests/test_class_values_context_handler.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/tests/test_credentials.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/tests/test_domain_context_handler.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/tests/test_gui.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/tests/test_matplotlib_export.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/tests/test_perfect_domain_context_handler.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/tests/test_scatterplot_density.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/tests/test_settings_handler.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/tests/test_widgets_outputs.py +0 -0
- {aait-0.0.4.76 → aait-0.0.4.78}/tests/test_workflows.py +0 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aait
|
|
3
|
-
Version: 0.0.4.
|
|
3
|
+
Version: 0.0.4.78
|
|
4
4
|
Summary: Advanced Artificial Intelligence Tools is a package meant to develop and enable advanced AI functionalities in Orange
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: Orange community
|
|
7
7
|
Author-email:
|
|
8
8
|
Keywords: orange3 add-on
|
|
9
9
|
License-File: License.txt
|
|
10
|
-
Requires-Dist: torch==2.
|
|
10
|
+
Requires-Dist: torch==2.6.0; sys_platform != "darwin"
|
|
11
|
+
Requires-Dist: torch==2.2.2; sys_platform == "darwin"
|
|
11
12
|
Requires-Dist: sentence-transformers==3.3.1
|
|
12
13
|
Requires-Dist: gpt4all[all]==2.8.2
|
|
13
14
|
Requires-Dist: sacremoses==0.1.1
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aait
|
|
3
|
-
Version: 0.0.4.
|
|
3
|
+
Version: 0.0.4.78
|
|
4
4
|
Summary: Advanced Artificial Intelligence Tools is a package meant to develop and enable advanced AI functionalities in Orange
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: Orange community
|
|
7
7
|
Author-email:
|
|
8
8
|
Keywords: orange3 add-on
|
|
9
9
|
License-File: License.txt
|
|
10
|
-
Requires-Dist: torch==2.
|
|
10
|
+
Requires-Dist: torch==2.6.0; sys_platform != "darwin"
|
|
11
|
+
Requires-Dist: torch==2.2.2; sys_platform == "darwin"
|
|
11
12
|
Requires-Dist: sentence-transformers==3.3.1
|
|
12
13
|
Requires-Dist: gpt4all[all]==2.8.2
|
|
13
14
|
Requires-Dist: sacremoses==0.1.1
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
torch==2.2.2
|
|
2
1
|
sentence-transformers==3.3.1
|
|
3
2
|
gpt4all[all]==2.8.2
|
|
4
3
|
sacremoses==0.1.1
|
|
@@ -17,3 +16,9 @@ unidecode==1.3.8
|
|
|
17
16
|
python-docx==1.1.2
|
|
18
17
|
psutil
|
|
19
18
|
thefuzz==0.22.1
|
|
19
|
+
|
|
20
|
+
[:sys_platform != "darwin"]
|
|
21
|
+
torch==2.6.0
|
|
22
|
+
|
|
23
|
+
[:sys_platform == "darwin"]
|
|
24
|
+
torch==2.2.2
|
|
@@ -111,7 +111,7 @@ def load_model(model_path, use_gpu, n_ctx=10000):
|
|
|
111
111
|
return
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, progress_callback=None, argself=None):
|
|
114
|
+
def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, workflow_id="", progress_callback=None, argself=None):
|
|
115
115
|
"""
|
|
116
116
|
Generates answers using a local LLM for each row in a data table with a "prompt" column.
|
|
117
117
|
|
|
@@ -124,6 +124,7 @@ def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, progress_call
|
|
|
124
124
|
model_path (str): Path to the local model file.
|
|
125
125
|
use_gpu (bool): Whether to use GPU (CUDA/Metal) acceleration if available. Default is False.
|
|
126
126
|
n_ctx (int): Context window size for the model. Default is 4096.
|
|
127
|
+
workflow_id (str): ID for streaming the answer.
|
|
127
128
|
progress_callback (callable, optional): Function to report progress updates.
|
|
128
129
|
argself (object, optional): An object with a `.stop` attribute to support early termination.
|
|
129
130
|
|
|
@@ -152,7 +153,7 @@ def generate_answers(table, model_path, use_gpu=False, n_ctx=4096, progress_call
|
|
|
152
153
|
assistant_prompt = row["assistant prompt"].value if "assistant prompt" in data.domain else ""
|
|
153
154
|
|
|
154
155
|
prompt = prompt_management.apply_prompt_template(model_path, user_prompt=prompt, assistant_prompt=assistant_prompt, system_prompt=system_prompt)
|
|
155
|
-
answer = run_query(prompt, model=model, argself=argself, progress_callback=progress_callback)
|
|
156
|
+
answer = run_query(prompt, model=model, workflow_id=workflow_id, argself=argself, progress_callback=progress_callback)
|
|
156
157
|
if answer == "":
|
|
157
158
|
answer = f"Error: The answer could not be generated. The model architecture you tried to use it most likely not supported yet.\n\nModel name: {ntpath.basename(model_path)}"
|
|
158
159
|
metas += [answer]
|
|
@@ -201,8 +202,9 @@ class StopCallback:
|
|
|
201
202
|
|
|
202
203
|
return True # Continue generation
|
|
203
204
|
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
|
|
206
|
+
def write_tokens_to_file(token: str, workflow_id=""):
|
|
207
|
+
chemin_dossier = MetManagement.get_api_local_folder(workflow_id=workflow_id)
|
|
206
208
|
if os.path.exists(chemin_dossier):
|
|
207
209
|
filepath = os.path.join(chemin_dossier, "chat_output.txt")
|
|
208
210
|
with open(filepath, "a", encoding="utf-8") as f:
|
|
@@ -210,7 +212,7 @@ def write_tokens_to_file(token: str):
|
|
|
210
212
|
f.flush()
|
|
211
213
|
|
|
212
214
|
def run_query(prompt, model, max_tokens=4096, temperature=0, top_p=0, top_k=40, repeat_penalty=1.15,
|
|
213
|
-
argself=None, progress_callback=None):
|
|
215
|
+
workflow_id="", argself=None, progress_callback=None):
|
|
214
216
|
"""
|
|
215
217
|
Generates a response from a local LLM model using the given prompt, with support for streaming output
|
|
216
218
|
and optional early stopping.
|
|
@@ -241,7 +243,7 @@ def run_query(prompt, model, max_tokens=4096, temperature=0, top_p=0, top_k=40,
|
|
|
241
243
|
repeat_penalty=repeat_penalty, streaming=True, callback=callback_instance):
|
|
242
244
|
|
|
243
245
|
answer += token
|
|
244
|
-
write_tokens_to_file(token)
|
|
246
|
+
write_tokens_to_file(token, workflow_id)
|
|
245
247
|
if progress_callback is not None:
|
|
246
248
|
progress_callback((None, token))
|
|
247
249
|
if argself is not None and argself.stop:
|
|
@@ -16,9 +16,6 @@ def create_chunks(table, model, chunk_size=500, overlap=125, mode="words", progr
|
|
|
16
16
|
Returns:
|
|
17
17
|
out_data (Table): The data table with a column "Chunks" (and more rows if several chunks were obtained per text)
|
|
18
18
|
"""
|
|
19
|
-
import copy
|
|
20
|
-
from Orange.data import Domain, Table, StringVariable, ContinuousVariable
|
|
21
|
-
|
|
22
19
|
data = copy.deepcopy(table)
|
|
23
20
|
|
|
24
21
|
# Définir la fonction de chunking selon le mode
|
|
@@ -35,22 +32,19 @@ def create_chunks(table, model, chunk_size=500, overlap=125, mode="words", progr
|
|
|
35
32
|
else:
|
|
36
33
|
raise ValueError(f"Invalid mode: {mode}. Valid modes are: 'tokens', 'words', 'sentence', 'markdown', 'semantic'")
|
|
37
34
|
|
|
38
|
-
new_metas = [StringVariable("Chunks"), ContinuousVariable("Chunks index"), StringVariable("Metadata")]
|
|
39
|
-
|
|
35
|
+
#new_metas = [StringVariable("Chunks"), ContinuousVariable("Chunks index"), StringVariable("Metadata")]
|
|
36
|
+
new_metas = list(data.domain.metas) + [StringVariable("Chunks"), ContinuousVariable("Chunks index"), StringVariable("Metadata")]
|
|
40
37
|
new_domain = Domain(data.domain.attributes, data.domain.class_vars, new_metas)
|
|
41
38
|
|
|
42
39
|
new_rows = []
|
|
43
|
-
for row in data:
|
|
40
|
+
for i, row in enumerate(data):
|
|
44
41
|
content = row["content"].value
|
|
45
|
-
chunks,
|
|
46
|
-
|
|
47
|
-
for
|
|
48
|
-
#
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
metas_values = [chunk, i, metadata]
|
|
52
|
-
|
|
53
|
-
new_instance = Orange.data.Instance(new_domain, attr_values + class_values + metas_values)
|
|
42
|
+
chunks, metadata = chunk_function(content, tokenizer=model.tokenizer, chunk_size=chunk_size, chunk_overlap=overlap)
|
|
43
|
+
# For each chunk in the chunked data
|
|
44
|
+
for j, chunk in enumerate(chunks):
|
|
45
|
+
# Build a new row with the previous data and the chunk
|
|
46
|
+
new_metas_values = list(row.metas) + [chunk] + [j] + [metadata]
|
|
47
|
+
new_instance = Orange.data.Instance(new_domain, [row[x] for x in data.domain.attributes] + [row[y] for y in data.domain.class_vars] + new_metas_values)
|
|
54
48
|
new_rows.append(new_instance)
|
|
55
49
|
|
|
56
50
|
return Table.from_list(domain=new_domain, rows=new_rows)
|
|
@@ -59,9 +59,9 @@ print("Send Input - Return Code:", input_result.returncode)
|
|
|
59
59
|
# Step 3: Poke the workflow to get the progress / results
|
|
60
60
|
print("\nWaiting for workflow to complete...")
|
|
61
61
|
output_command = ["curl", "--location", "http://127.0.0.1:8000/output-workflow"]
|
|
62
|
-
timeout =
|
|
62
|
+
timeout = 600
|
|
63
63
|
k = 0
|
|
64
|
-
while k <
|
|
64
|
+
while k < timeout:
|
|
65
65
|
output_result = subprocess.run(output_command, capture_output=True)
|
|
66
66
|
stdout_utf8 = output_result.stdout.decode("utf-8")
|
|
67
67
|
parsed_response = json.loads(stdout_utf8)
|
|
@@ -81,7 +81,9 @@ print("\nRaw Output:\n", stdout_utf8)
|
|
|
81
81
|
try:
|
|
82
82
|
parsed_response = json.loads(stdout_utf8)
|
|
83
83
|
print("\nParsed Response:\n", parsed_response)
|
|
84
|
-
|
|
84
|
+
question = parsed_response["_result"][0]["content"]
|
|
85
|
+
answer = parsed_response["_result"][0]["Answer"]
|
|
86
|
+
print("\nQuestion:", question)
|
|
85
87
|
print("\nAnswer:", answer)
|
|
86
88
|
except json.JSONDecodeError as e:
|
|
87
89
|
print("Failed to parse JSON:", e)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import subprocess
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
workflow_key = "
|
|
4
|
+
workflow_key = "Acuity - RAG"
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
# Step 1: Start the workflow
|
|
8
8
|
start_command = [
|
|
9
9
|
"curl",
|
|
10
|
-
"-X", "GET",
|
|
10
|
+
"-X", "'GET'",
|
|
11
11
|
f"http://localhost:8000/start-workflow/{workflow_key}",
|
|
12
12
|
"-H", "accept: application/json"
|
|
13
13
|
]
|
|
@@ -1303,9 +1303,16 @@ def reset_files(files, attempts=10, delay=0.05):
|
|
|
1303
1303
|
return 1 # Failure if the folder still exists
|
|
1304
1304
|
return 0
|
|
1305
1305
|
|
|
1306
|
-
def get_api_local_folder():
|
|
1306
|
+
def get_api_local_folder(workflow_id=""):
|
|
1307
1307
|
aait_path = get_local_store_path()
|
|
1308
|
-
|
|
1308
|
+
result=aait_path + "exchangeApi/"
|
|
1309
|
+
if workflow_id=="":
|
|
1310
|
+
return result
|
|
1311
|
+
if len(workflow_id)>4:
|
|
1312
|
+
if workflow_id[-4:]==".ows":
|
|
1313
|
+
workflow_id=workflow_id[:-4]
|
|
1314
|
+
result+=workflow_id+"/"
|
|
1315
|
+
return result
|
|
1309
1316
|
def get_api_local_folder_admin():
|
|
1310
1317
|
return get_api_local_folder()[:-1]+"_adm/"
|
|
1311
1318
|
def get_path_linkHTMLWorkflow():
|
|
@@ -7,7 +7,6 @@ from Orange.widgets.settings import Setting
|
|
|
7
7
|
from AnyQt.QtWidgets import QLineEdit
|
|
8
8
|
|
|
9
9
|
from sentence_transformers import SentenceTransformer
|
|
10
|
-
from chonkie import SemanticChunker
|
|
11
10
|
|
|
12
11
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
13
12
|
from Orange.widgets.orangecontrib.AAIT.llm import chunking
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import tempfile
|
|
3
|
+
import subprocess
|
|
4
|
+
import subprocess
|
|
5
|
+
import time
|
|
6
|
+
import uuid
|
|
7
|
+
from AnyQt.QtWidgets import QPushButton, QApplication
|
|
8
|
+
from AnyQt import uic
|
|
9
|
+
import ctypes
|
|
10
|
+
import ctypes.wintypes
|
|
11
|
+
from Orange.widgets.widget import OWWidget, Output, Input
|
|
12
|
+
from Orange.data import Table, Domain, StringVariable
|
|
13
|
+
|
|
14
|
+
class OWInputSelector(OWWidget):
|
|
15
|
+
name = "Input Selector"
|
|
16
|
+
description = "Select a file or a folder and assign it as a path"
|
|
17
|
+
icon = "icons/in_or_out.png"
|
|
18
|
+
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
19
|
+
icon = "icons_dev/in_or_out.png"
|
|
20
|
+
gui_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "designer/ow_in_or_out_path.ui")
|
|
21
|
+
priority = 10
|
|
22
|
+
|
|
23
|
+
class Inputs:
|
|
24
|
+
file_input = Input("File", Table)
|
|
25
|
+
folder_input = Input("Folder", Table)
|
|
26
|
+
|
|
27
|
+
class Outputs:
|
|
28
|
+
path = Output("Path", Table)
|
|
29
|
+
|
|
30
|
+
def __init__(self):
|
|
31
|
+
super().__init__()
|
|
32
|
+
self.selected_path = ""
|
|
33
|
+
self.in_data = None
|
|
34
|
+
|
|
35
|
+
# Load UI
|
|
36
|
+
uic.loadUi(self.gui_path, self)
|
|
37
|
+
|
|
38
|
+
self.file_button = self.findChild(QPushButton, 'fileButton')
|
|
39
|
+
self.folder_button = self.findChild(QPushButton, 'folderButton')
|
|
40
|
+
|
|
41
|
+
# Connect buttons
|
|
42
|
+
self.file_button.clicked.connect(self.on_click_file_button)
|
|
43
|
+
self.folder_button.clicked.connect(self.on_click_folder_button)
|
|
44
|
+
|
|
45
|
+
@Inputs.file_input
|
|
46
|
+
def set_file_input(self, data):
|
|
47
|
+
self.in_data = data
|
|
48
|
+
if data is not None:
|
|
49
|
+
self.select_file()
|
|
50
|
+
|
|
51
|
+
@Inputs.folder_input
|
|
52
|
+
def set_folder_input(self, data):
|
|
53
|
+
self.in_data = data
|
|
54
|
+
if data is not None:
|
|
55
|
+
self.select_folder()
|
|
56
|
+
|
|
57
|
+
def on_click_file_button(self):
|
|
58
|
+
self.in_data = None
|
|
59
|
+
self.select_file()
|
|
60
|
+
|
|
61
|
+
def on_click_folder_button(self):
|
|
62
|
+
self.in_data = None
|
|
63
|
+
self.select_folder()
|
|
64
|
+
|
|
65
|
+
import ctypes
|
|
66
|
+
import os
|
|
67
|
+
|
|
68
|
+
import ctypes
|
|
69
|
+
import ctypes.wintypes
|
|
70
|
+
import time
|
|
71
|
+
|
|
72
|
+
def select_folder_ctypes(self):
|
|
73
|
+
BIF_RETURNONLYFSDIRS = 0x0001
|
|
74
|
+
BIF_NEWDIALOGSTYLE = 0x0040
|
|
75
|
+
MAX_PATH = 260
|
|
76
|
+
|
|
77
|
+
SWP_NOMOVE = 0x0002
|
|
78
|
+
SWP_NOSIZE = 0x0001
|
|
79
|
+
SWP_SHOWWINDOW = 0x0040
|
|
80
|
+
HWND_TOPMOST = -1
|
|
81
|
+
|
|
82
|
+
# Structures
|
|
83
|
+
class BROWSEINFO(ctypes.Structure):
|
|
84
|
+
_fields_ = [
|
|
85
|
+
("hwndOwner", ctypes.wintypes.HWND),
|
|
86
|
+
("pidlRoot", ctypes.c_void_p),
|
|
87
|
+
("pszDisplayName", ctypes.c_wchar_p),
|
|
88
|
+
("lpszTitle", ctypes.c_wchar_p),
|
|
89
|
+
("ulFlags", ctypes.wintypes.UINT),
|
|
90
|
+
("lpfn", ctypes.c_void_p),
|
|
91
|
+
("lParam", ctypes.c_void_p),
|
|
92
|
+
("iImage", ctypes.wintypes.INT),
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
# Fonctions Windows
|
|
96
|
+
user32 = ctypes.windll.user32
|
|
97
|
+
kernel32 = ctypes.windll.kernel32
|
|
98
|
+
shell32 = ctypes.windll.shell32
|
|
99
|
+
|
|
100
|
+
SHBrowseForFolderW = shell32.SHBrowseForFolderW
|
|
101
|
+
SHGetPathFromIDListW = shell32.SHGetPathFromIDListW
|
|
102
|
+
CoTaskMemFree = ctypes.windll.ole32.CoTaskMemFree
|
|
103
|
+
|
|
104
|
+
SHGetPathFromIDListW.argtypes = [ctypes.c_void_p, ctypes.c_wchar_p]
|
|
105
|
+
SHGetPathFromIDListW.restype = ctypes.wintypes.BOOL
|
|
106
|
+
SHBrowseForFolderW.argtypes = [ctypes.POINTER(BROWSEINFO)]
|
|
107
|
+
SHBrowseForFolderW.restype = ctypes.c_void_p
|
|
108
|
+
|
|
109
|
+
# Récupérer les fenêtres ouvertes AVANT
|
|
110
|
+
hwnd_list_before = []
|
|
111
|
+
|
|
112
|
+
def enum_windows_proc(hwnd, lParam):
|
|
113
|
+
hwnd_list_before.append(hwnd)
|
|
114
|
+
return True
|
|
115
|
+
|
|
116
|
+
EnumWindows = user32.EnumWindows
|
|
117
|
+
EnumWindowsProc = ctypes.WINFUNCTYPE(ctypes.wintypes.BOOL, ctypes.wintypes.HWND, ctypes.wintypes.LPARAM)
|
|
118
|
+
EnumWindows(EnumWindowsProc(enum_windows_proc), 0)
|
|
119
|
+
|
|
120
|
+
# Préparer browseinfo
|
|
121
|
+
display_name_buffer = ctypes.create_unicode_buffer(MAX_PATH)
|
|
122
|
+
|
|
123
|
+
browse_info = BROWSEINFO()
|
|
124
|
+
hwnd_owner = int(self.winId()) # Si PyQt5/PyQt6
|
|
125
|
+
browse_info.hwndOwner = hwnd_owner
|
|
126
|
+
browse_info.pidlRoot = None
|
|
127
|
+
browse_info.pszDisplayName = ctypes.cast(display_name_buffer, ctypes.c_wchar_p)
|
|
128
|
+
browse_info.lpszTitle = "select a directory"
|
|
129
|
+
browse_info.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE
|
|
130
|
+
browse_info.lpfn = None
|
|
131
|
+
browse_info.lParam = None
|
|
132
|
+
browse_info.iImage = 0
|
|
133
|
+
|
|
134
|
+
# Ouvrir boîte de dialogue
|
|
135
|
+
pidl = SHBrowseForFolderW(ctypes.byref(browse_info))
|
|
136
|
+
|
|
137
|
+
# Petit délai pour être sûr que la fenêtre soit affichée
|
|
138
|
+
time.sleep(0.1)
|
|
139
|
+
|
|
140
|
+
# Récupérer les fenêtres ouvertes APRES
|
|
141
|
+
hwnd_list_after = []
|
|
142
|
+
|
|
143
|
+
def enum_windows_proc_after(hwnd, lParam):
|
|
144
|
+
hwnd_list_after.append(hwnd)
|
|
145
|
+
return True
|
|
146
|
+
|
|
147
|
+
EnumWindows(EnumWindowsProc(enum_windows_proc_after), 0)
|
|
148
|
+
|
|
149
|
+
# Détecter la nouvelle fenêtre
|
|
150
|
+
new_hwnds = list(set(hwnd_list_after) - set(hwnd_list_before))
|
|
151
|
+
|
|
152
|
+
for hwnd in new_hwnds:
|
|
153
|
+
# Forcer au premier plan
|
|
154
|
+
user32.SetForegroundWindow(hwnd)
|
|
155
|
+
user32.SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW)
|
|
156
|
+
|
|
157
|
+
folder_path = ""
|
|
158
|
+
|
|
159
|
+
if pidl:
|
|
160
|
+
path_buffer = ctypes.create_unicode_buffer(MAX_PATH)
|
|
161
|
+
success = SHGetPathFromIDListW(pidl, path_buffer)
|
|
162
|
+
if success:
|
|
163
|
+
folder_path = path_buffer.value
|
|
164
|
+
else:
|
|
165
|
+
folder_path =""
|
|
166
|
+
|
|
167
|
+
CoTaskMemFree(ctypes.c_void_p(pidl))
|
|
168
|
+
return folder_path
|
|
169
|
+
|
|
170
|
+
def select_file(self):
|
|
171
|
+
return self.select_folder_ctypes()
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
# def select_file(self):
|
|
176
|
+
# ps_code = """
|
|
177
|
+
# Add-Type -AssemblyName System.Windows.Forms
|
|
178
|
+
# Add-Type -AssemblyName System.Drawing
|
|
179
|
+
#
|
|
180
|
+
# $parentForm = New-Object System.Windows.Forms.Form -Property @{
|
|
181
|
+
# Size = New-Object System.Drawing.Size(0,0)
|
|
182
|
+
# StartPosition = 'CenterScreen'
|
|
183
|
+
# TopMost = $true
|
|
184
|
+
# ShowInTaskbar = $false
|
|
185
|
+
# FormBorderStyle = 'None'
|
|
186
|
+
# Opacity = 0
|
|
187
|
+
# }
|
|
188
|
+
#
|
|
189
|
+
# $openFileDialog = New-Object System.Windows.Forms.OpenFileDialog -Property @{
|
|
190
|
+
# Filter = "All files (*.*)|*.*"
|
|
191
|
+
# Multiselect = $false
|
|
192
|
+
# }
|
|
193
|
+
#
|
|
194
|
+
# $result = $openFileDialog.ShowDialog($parentForm)
|
|
195
|
+
# if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
|
|
196
|
+
# $openFileDialog.FileName
|
|
197
|
+
# }
|
|
198
|
+
#
|
|
199
|
+
# $parentForm.Close()
|
|
200
|
+
# """
|
|
201
|
+
#
|
|
202
|
+
# with tempfile.NamedTemporaryFile(delete=False, suffix=".ps1", mode="w", encoding="utf-8") as temp_ps1:
|
|
203
|
+
# temp_ps1.write(ps_code)
|
|
204
|
+
# temp_ps1_path = temp_ps1.name
|
|
205
|
+
#
|
|
206
|
+
# try:
|
|
207
|
+
# completed = subprocess.run(
|
|
208
|
+
# ["powershell", "-ExecutionPolicy", "Bypass", "-File", temp_ps1_path],
|
|
209
|
+
# capture_output=True, text=True
|
|
210
|
+
# )
|
|
211
|
+
# file_path = completed.stdout.strip()
|
|
212
|
+
# if file_path:
|
|
213
|
+
# self.selected_path = file_path
|
|
214
|
+
# self.commit_path()
|
|
215
|
+
# finally:
|
|
216
|
+
# os.remove(temp_ps1_path)
|
|
217
|
+
|
|
218
|
+
def select_folder(self):
|
|
219
|
+
from AnyQt.QtWidgets import QFileDialog
|
|
220
|
+
folder_path = QFileDialog.getExistingDirectory(self, "Sélectionner un dossier")
|
|
221
|
+
if folder_path:
|
|
222
|
+
self.selected_path = folder_path
|
|
223
|
+
self.commit_path()
|
|
224
|
+
|
|
225
|
+
def commit_path(self):
|
|
226
|
+
if not self.selected_path:
|
|
227
|
+
return
|
|
228
|
+
|
|
229
|
+
var = StringVariable("path")
|
|
230
|
+
|
|
231
|
+
if self.in_data is not None:
|
|
232
|
+
domain = Domain(
|
|
233
|
+
self.in_data.domain.attributes,
|
|
234
|
+
self.in_data.domain.class_vars,
|
|
235
|
+
list(self.in_data.domain.metas) + [var]
|
|
236
|
+
)
|
|
237
|
+
new_table = Table.from_table(domain, self.in_data)
|
|
238
|
+
new_meta_column = [self.selected_path] * len(new_table)
|
|
239
|
+
new_table.metas[:, -1] = new_meta_column
|
|
240
|
+
else:
|
|
241
|
+
domain = Domain([], metas=[var])
|
|
242
|
+
new_table = Table(domain, [[]])
|
|
243
|
+
new_table.metas[0] = [self.selected_path]
|
|
244
|
+
|
|
245
|
+
self.Outputs.path.send(new_table)
|
|
246
|
+
|
|
247
|
+
def handleNewSignals(self):
|
|
248
|
+
pass
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
# Test standalone
|
|
252
|
+
if __name__ == "__main__":
|
|
253
|
+
import sys
|
|
254
|
+
app = QApplication(sys.argv)
|
|
255
|
+
window = OWInputSelector()
|
|
256
|
+
window.show()
|
|
257
|
+
sys.exit(app.exec_())
|
|
@@ -3,7 +3,7 @@ import sys
|
|
|
3
3
|
|
|
4
4
|
import Orange.data
|
|
5
5
|
from AnyQt.QtWidgets import QApplication, QLabel
|
|
6
|
-
from Orange.widgets import widget
|
|
6
|
+
from Orange.widgets import widget, gui
|
|
7
7
|
from Orange.widgets.utils.signals import Input, Output
|
|
8
8
|
from Orange.widgets.settings import Setting
|
|
9
9
|
from AnyQt.QtWidgets import QLineEdit, QTextBrowser
|
|
@@ -29,8 +29,9 @@ class OWQueryLLM(widget.OWWidget):
|
|
|
29
29
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
30
30
|
icon = "icons_dev/owqueryllm.svg"
|
|
31
31
|
gui = os.path.join(os.path.dirname(os.path.abspath(__file__)), "designer/owqueryllm.ui")
|
|
32
|
-
want_control_area =
|
|
32
|
+
want_control_area = True
|
|
33
33
|
priority = 1089
|
|
34
|
+
|
|
34
35
|
class Inputs:
|
|
35
36
|
data = Input("Data", Orange.data.Table)
|
|
36
37
|
model_path = Input("Model", str)
|
|
@@ -39,6 +40,7 @@ class OWQueryLLM(widget.OWWidget):
|
|
|
39
40
|
data = Output("Data", Orange.data.Table)
|
|
40
41
|
|
|
41
42
|
n_ctx: str = Setting("4096")
|
|
43
|
+
workflow_id = Setting("")
|
|
42
44
|
|
|
43
45
|
@Inputs.data
|
|
44
46
|
def set_data(self, in_data):
|
|
@@ -60,10 +62,18 @@ class OWQueryLLM(widget.OWWidget):
|
|
|
60
62
|
self.setFixedHeight(500)
|
|
61
63
|
uic.loadUi(self.gui, self)
|
|
62
64
|
self.label_description = self.findChild(QLabel, 'Description')
|
|
65
|
+
# Context size
|
|
63
66
|
self.edit_nCtx = self.findChild(QLineEdit, 'lineEdit')
|
|
64
67
|
self.edit_nCtx.setText(str(self.n_ctx))
|
|
65
68
|
self.edit_nCtx.editingFinished.connect(self.update_n_ctx)
|
|
69
|
+
# Text browser
|
|
66
70
|
self.textBrowser = self.findChild(QTextBrowser, 'textBrowser')
|
|
71
|
+
# Workflow ID for streaming
|
|
72
|
+
self.edit_ID = self.findChild(QLineEdit, 'lineEdit_2')
|
|
73
|
+
self.edit_ID.setText(self.workflow_id)
|
|
74
|
+
self.edit_ID.editingFinished.connect(self.update_workflow_id)
|
|
75
|
+
|
|
76
|
+
|
|
67
77
|
|
|
68
78
|
# # Data Management
|
|
69
79
|
self.data = None
|
|
@@ -74,6 +84,7 @@ class OWQueryLLM(widget.OWWidget):
|
|
|
74
84
|
self.can_run = True
|
|
75
85
|
self.result = None
|
|
76
86
|
self.n_ctx = self.edit_nCtx.text() if self.edit_nCtx.text().isdigit() else "4096"
|
|
87
|
+
self.workflow_id = self.edit_ID.text()
|
|
77
88
|
|
|
78
89
|
# Custom updates
|
|
79
90
|
self.post_initialized()
|
|
@@ -84,6 +95,12 @@ class OWQueryLLM(widget.OWWidget):
|
|
|
84
95
|
self.edit_nCtx.setText(self.n_ctx)
|
|
85
96
|
answers.check_gpu(self.model_path, self)
|
|
86
97
|
|
|
98
|
+
def update_workflow_id(self):
|
|
99
|
+
self.workflow_id = self.edit_ID.text()
|
|
100
|
+
if self.workflow_id != "":
|
|
101
|
+
if self.thread is None:
|
|
102
|
+
self.run()
|
|
103
|
+
|
|
87
104
|
def run(self):
|
|
88
105
|
if not self.can_run:
|
|
89
106
|
return
|
|
@@ -111,7 +128,7 @@ class OWQueryLLM(widget.OWWidget):
|
|
|
111
128
|
# --> result is used to collect the result from main function
|
|
112
129
|
# --> finish is just an empty signal to indicate that the thread is finished
|
|
113
130
|
self.thread = thread_management.Thread(answers.generate_answers, self.data, self.model_path,
|
|
114
|
-
self.use_gpu, int(self.n_ctx))
|
|
131
|
+
self.use_gpu, int(self.n_ctx), self.workflow_id)
|
|
115
132
|
self.thread.progress.connect(self.handle_progress)
|
|
116
133
|
self.thread.result.connect(self.handle_result)
|
|
117
134
|
self.thread.finish.connect(self.handle_finish)
|
|
@@ -74,6 +74,25 @@
|
|
|
74
74
|
</rect>
|
|
75
75
|
</property>
|
|
76
76
|
</widget>
|
|
77
|
+
<widget class="QLineEdit" name="lineEdit_2">
|
|
78
|
+
<property name="geometry">
|
|
79
|
+
<rect>
|
|
80
|
+
<x>540</x>
|
|
81
|
+
<y>20</y>
|
|
82
|
+
<width>121</width>
|
|
83
|
+
<height>41</height>
|
|
84
|
+
</rect>
|
|
85
|
+
</property>
|
|
86
|
+
<property name="text">
|
|
87
|
+
<string/>
|
|
88
|
+
</property>
|
|
89
|
+
<property name="alignment">
|
|
90
|
+
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
91
|
+
</property>
|
|
92
|
+
<property name="placeholderText">
|
|
93
|
+
<string>workflow ID</string>
|
|
94
|
+
</property>
|
|
95
|
+
</widget>
|
|
77
96
|
</widget>
|
|
78
97
|
<resources/>
|
|
79
98
|
<connections/>
|
|
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
|
|
|
4
4
|
NAME = "aait"
|
|
5
5
|
|
|
6
6
|
# Version du package PyPI
|
|
7
|
-
VERSION = "0.0.4.
|
|
7
|
+
VERSION = "0.0.4.78" # la version doit être supérieure à la précédente sinon la publication sera refusée
|
|
8
8
|
|
|
9
9
|
# Facultatif / Adaptable à souhait
|
|
10
10
|
AUTHOR = "Orange community"
|
|
@@ -33,10 +33,29 @@ PACKAGE_DATA = {
|
|
|
33
33
|
# /!\ les noms de fichier 'orangecontrib.hkh_bot.widgets' doivent correspondre à l'arborescence
|
|
34
34
|
|
|
35
35
|
# Dépendances
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
|
|
37
|
+
INSTALL_REQUIRES = [
|
|
38
|
+
"torch==2.6.0; sys_platform != 'darwin'",
|
|
39
|
+
"torch==2.2.2; sys_platform == 'darwin'",
|
|
40
|
+
"sentence-transformers==3.3.1",
|
|
41
|
+
"gpt4all[all]==2.8.2",
|
|
42
|
+
"sacremoses==0.1.1",
|
|
43
|
+
"transformers==4.46.3",
|
|
44
|
+
"sentencepiece==0.2.0",
|
|
45
|
+
"optuna",
|
|
46
|
+
"spacy==3.7.6",
|
|
47
|
+
"markdown",
|
|
48
|
+
"uvicorn",
|
|
49
|
+
"fastapi",
|
|
50
|
+
"python-multipart",
|
|
51
|
+
"PyMuPDF==1.24.14",
|
|
52
|
+
"chonkie==0.4.1",
|
|
53
|
+
"GPUtil==1.4.0",
|
|
54
|
+
"unidecode==1.3.8",
|
|
55
|
+
"python-docx==1.1.2",
|
|
56
|
+
"psutil",
|
|
57
|
+
"thefuzz==0.22.1"]
|
|
58
|
+
|
|
40
59
|
|
|
41
60
|
# Spécifie le dossier contenant les widgets et le nom de section qu'aura l'addon sur Orange
|
|
42
61
|
ENTRY_POINTS = {
|