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.
Files changed (265) hide show
  1. {aait-2.3.12 → aait-2.3.12.1}/PKG-INFO +1 -1
  2. {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/PKG-INFO +1 -1
  3. {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/SOURCES.txt +7 -1
  4. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/__init__.py +18 -18
  5. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/answers_llama.py +125 -67
  6. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/process_documents.py +2 -2
  7. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/OperationSystem.py +5 -1
  8. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/subprocess_management.py +7 -3
  9. aait-2.3.12.1/orangecontrib/AAIT/utils/widget_positioning.py +64 -0
  10. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWAddColumns.py +1 -1
  11. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWDisplayMD.py +22 -1
  12. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWExtractTokens.py +12 -2
  13. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWFusionNM.py +1 -1
  14. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWGenerateWord.py +1 -1
  15. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLLMEngine.py +9 -1
  16. aait-2.3.12.1/orangecontrib/AAIT/widgets/OWModel_Embeddings.py +88 -0
  17. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWOperationSystem.py +41 -1
  18. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWQueryLLM.py +1 -1
  19. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWSelectColumnDynamique.py +1 -1
  20. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWSortAndSelect.py +2 -2
  21. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/ow_OperationSystem.ui +25 -2
  22. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owedgellm.ui +1 -1
  23. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owextracttokens.ui +51 -6
  24. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owqueryllm.ui +1 -1
  25. aait-2.3.12.1/orangecontrib/AAIT/widgets/icons/CreateInstance.svg +108 -0
  26. aait-2.3.12.1/orangecontrib/AAIT/widgets/icons/Table.svg +86 -0
  27. aait-2.3.12.1/orangecontrib/AAIT/widgets/icons/owmodel_embeddings.svg +25 -0
  28. aait-2.3.12.1/orangecontrib/AAIT/widgets/owautoshowcreateinstance.py +750 -0
  29. aait-2.3.12.1/orangecontrib/AAIT/widgets/owautoshowtable.py +670 -0
  30. {aait-2.3.12 → aait-2.3.12.1}/setup.py +1 -1
  31. {aait-2.3.12 → aait-2.3.12.1}/License.txt +0 -0
  32. {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/dependency_links.txt +0 -0
  33. {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/entry_points.txt +0 -0
  34. {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/namespace_packages.txt +0 -0
  35. {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/requires.txt +0 -0
  36. {aait-2.3.12 → aait-2.3.12.1}/aait.egg-info/top_level.txt +0 -0
  37. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/fix_torch/fix_torch_dll_error.py +0 -0
  38. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/fix_torch/libomp140.x86_64.dll +0 -0
  39. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/__init__.py +0 -0
  40. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/answers.py +0 -0
  41. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/chunking.py +0 -0
  42. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/embeddings.py +0 -0
  43. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/lemmes.py +0 -0
  44. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/lmstudio.py +0 -0
  45. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/prompt_management.py +0 -0
  46. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/llm/translations.py +0 -0
  47. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/optimiser/__init__.py +0 -0
  48. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/optimiser/optuna_multi.py +0 -0
  49. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/MetManagement.py +0 -0
  50. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/SimpleDialogQt.py +0 -0
  51. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/__init__.py +0 -0
  52. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/aait_repo_file.py +0 -0
  53. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/aait_table_viewer.py +0 -0
  54. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/base_widget.py +0 -0
  55. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/delta_local_shared_fodler.py +0 -0
  56. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/import_uic.py +0 -0
  57. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/initialize_from_ini.py +0 -0
  58. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/mac_utils.py +0 -0
  59. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/shared_functions.py +0 -0
  60. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/shared_variables.py +0 -0
  61. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/thread_management.py +0 -0
  62. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/tools/__init__.py +0 -0
  63. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/tools/change_owcorpus.py +0 -0
  64. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/tools/concat_splitted_pypi.py +0 -0
  65. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/tools/first_time_check.py +0 -0
  66. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/tools/owcorpus_ok.txt +0 -0
  67. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/unlink_table_domain.py +0 -0
  68. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/utils/windows_utils.py +0 -0
  69. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWAAITResourcesManager.py +0 -0
  70. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWAccumulator.py +0 -0
  71. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWApplyRules.py +0 -0
  72. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWCN2rule_view.py +0 -0
  73. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWChunking.py +0 -0
  74. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWConcatRules.py +0 -0
  75. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWConverseLLM.py +0 -0
  76. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWCreateEmbeddings.py +0 -0
  77. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWEditTable.py +0 -0
  78. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWEmptySwitch.py +0 -0
  79. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWEndLoop.py +0 -0
  80. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWExecuteScript.py +0 -0
  81. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWExtraChunks.py +0 -0
  82. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWFileMetadata.py +0 -0
  83. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWFileSyncChecker.py +0 -0
  84. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWFileWithPath.py +0 -0
  85. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWFindFilesFromDir.py +0 -0
  86. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWGenerateQuestions.py +0 -0
  87. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWGenerateSynthesis.py +0 -0
  88. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWInputSelector.py +0 -0
  89. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWKeywords.py +0 -0
  90. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWKeywordsDetection.py +0 -0
  91. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLMStudio.py +0 -0
  92. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLanguageDetection.py +0 -0
  93. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLargeLanguageModel.py +0 -0
  94. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLemmatizer.py +0 -0
  95. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWLoadDocuments.py +0 -0
  96. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_CE_MiniLML6.py +0 -0
  97. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Falcon.py +0 -0
  98. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_HelsinkiEnFr.py +0 -0
  99. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_HelsinkiFrEn.py +0 -0
  100. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_MPNET.py +0 -0
  101. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Mistral.py +0 -0
  102. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen.py +0 -0
  103. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen1B5_Q6.py +0 -0
  104. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen2_5_32B.py +0 -0
  105. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen3B_Q4.py +0 -0
  106. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q4.py +0 -0
  107. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q6.py +0 -0
  108. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_Solar.py +0 -0
  109. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_SolarUncensored.py +0 -0
  110. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_EN.py +0 -0
  111. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_FR.py +0 -0
  112. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWOptimisation.py +0 -0
  113. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWOptimisationSelection.py +0 -0
  114. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWOptimisationSendScore.py +0 -0
  115. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWProcessDocumentsFromPath.py +0 -0
  116. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWRandomData.py +0 -0
  117. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWReranking.py +0 -0
  118. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWSaveFilepathEntry.py +0 -0
  119. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWSelectRowsDynamic.py +0 -0
  120. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWStartLoop.py +0 -0
  121. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWTable2Corpus.py +0 -0
  122. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWTranslation.py +0 -0
  123. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWTrigger.py +0 -0
  124. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/OWUnzipFolder.py +0 -0
  125. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/POW_Wfactory.py +0 -0
  126. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/__init__.py +0 -0
  127. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owMarkdown.ui +0 -0
  128. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/ow_in_or_out_path.ui +0 -0
  129. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/ow_widget_random_data.ui +0 -0
  130. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owaccumulator.ui +0 -0
  131. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owaddcolumns.ui +0 -0
  132. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owapplyrules.ui +0 -0
  133. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owchunking.ui +0 -0
  134. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owconcatrules.ui +0 -0
  135. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owconversellm.ui +0 -0
  136. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owembeddings.ui +0 -0
  137. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owemptyswitch.ui +0 -0
  138. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owendloop.ui +0 -0
  139. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owexecutescript.ui +0 -0
  140. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owexecutescript_TEST.ui +0 -0
  141. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owextrachunks.ui +0 -0
  142. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owfilemetadata.ui +0 -0
  143. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owfilesyncchecker.ui +0 -0
  144. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owfilewithpath.ui +0 -0
  145. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owfindfilesfromdir.ui +0 -0
  146. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owfusion_nm.ui +0 -0
  147. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owgenerate_word.ui +0 -0
  148. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owgeneratequestions.ui +0 -0
  149. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owgeneratesynthesis.ui +0 -0
  150. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owkeyword.ui +0 -0
  151. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owkeywordsdetection.ui +0 -0
  152. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owlangdetect.ui +0 -0
  153. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owlargelanguagemodel.ui +0 -0
  154. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owlemmatizer.ui +0 -0
  155. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owllm4all.ui +0 -0
  156. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owloaddocuments.ui +0 -0
  157. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owloadworkflow.ui +0 -0
  158. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_ce_minilml6.ui +0 -0
  159. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_falcon.ui +0 -0
  160. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_en_fr.ui +0 -0
  161. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_fr_en.ui +0 -0
  162. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_mistral.ui +0 -0
  163. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_mpnet.ui +0 -0
  164. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen.ui +0 -0
  165. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_2.5_32b.ui +0 -0
  166. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_1.5b_q6.ui +0 -0
  167. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_3b_q4.ui +0 -0
  168. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_7b_q4.ui +0 -0
  169. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_7b_q6.ui +0 -0
  170. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_qwencoder_7b.ui +0 -0
  171. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_solar.ui +0 -0
  172. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_solar_uncensored.ui +0 -0
  173. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_en.ui +0 -0
  174. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_fr.ui +0 -0
  175. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/ownumberpointinrules.ui +0 -0
  176. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owprocessdocuments.ui +0 -0
  177. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owreranking.ui +0 -0
  178. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owsavewithpath.ui +0 -0
  179. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owselect_column_dynamic.ui +0 -0
  180. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owselect_row_dynamic.ui +0 -0
  181. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owsortandselect.ui +0 -0
  182. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owstartloop.ui +0 -0
  183. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owtable2corpus.ui +0 -0
  184. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owtranslation.ui +0 -0
  185. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owtrigger.ui +0 -0
  186. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/designer/owunzipfolder.ui +0 -0
  187. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/CN2RuleViewer.svg +0 -0
  188. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/MDViewer.png +0 -0
  189. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/Mistral.png +0 -0
  190. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/apply_rules.svg +0 -0
  191. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/blue_down_arrow.svg +0 -0
  192. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/category.svg +0 -0
  193. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/dark_green.txt +0 -0
  194. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/de.png +0 -0
  195. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/document_generator.png +0 -0
  196. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/documents.png +0 -0
  197. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/edge_llm.svg +0 -0
  198. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/endloop.png +0 -0
  199. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/extra_chunks.png +0 -0
  200. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/green_check.svg +0 -0
  201. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/in_or_out.png +0 -0
  202. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/input.png +0 -0
  203. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/languages.png +0 -0
  204. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/lm_studio.png +0 -0
  205. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/local_interf_img_multi_pull.svg +0 -0
  206. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/local_interf_multi_pull.svg +0 -0
  207. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/local_interf_pull.svg +0 -0
  208. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/local_interf_push.svg +0 -0
  209. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/local_interf_text_pull.svg +0 -0
  210. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/logo_solar.svg +0 -0
  211. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/logo_uncensoredsolar.svg +0 -0
  212. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/logo_upload.png +0 -0
  213. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/models.png +0 -0
  214. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/operationSystem.png +0 -0
  215. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/optimisation.png +0 -0
  216. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/optimizer.png +0 -0
  217. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/output.png +0 -0
  218. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owCN2_intersect_rules.svg +0 -0
  219. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owaccumulator.png +0 -0
  220. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owchunking.png +0 -0
  221. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owconversellm.svg +0 -0
  222. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owedittable.svg +0 -0
  223. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owembeddings.svg +0 -0
  224. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owemptyswitch.svg +0 -0
  225. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owenvinfo.png +0 -0
  226. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owexecutescript.svg +0 -0
  227. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owextracttokens.svg +0 -0
  228. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owfilemetadata.svg +0 -0
  229. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owfilesfromdir.svg +0 -0
  230. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owfilesyncchecker.svg +0 -0
  231. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owfilewithpath.svg +0 -0
  232. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owfusion_nm.png +0 -0
  233. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owgeneratequestions.svg +0 -0
  234. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owgeneratesynthesis.png +0 -0
  235. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owkeywords.png +0 -0
  236. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owkeywordsdetection.png +0 -0
  237. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owlargelanguagemodel.svg +0 -0
  238. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owlemmatizer.svg +0 -0
  239. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owloaddocuments.svg +0 -0
  240. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_ce_minilml6.svg +0 -0
  241. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_falcon.png +0 -0
  242. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_en_fr.svg +0 -0
  243. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_fr_en.svg +0 -0
  244. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_mpnet.svg +0 -0
  245. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_en.svg +0 -0
  246. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_fr.svg +0 -0
  247. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owoptimisation.svg +0 -0
  248. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owoptimisationselection.png +0 -0
  249. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owqueryllm.svg +0 -0
  250. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owreranking.svg +0 -0
  251. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owsavefilepathentry.svg +0 -0
  252. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owselectcolumndynamique.png +0 -0
  253. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owsortandselect.svg +0 -0
  254. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owtable2corpus.svg +0 -0
  255. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owtranslation.svg +0 -0
  256. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/owtrigger.svg +0 -0
  257. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/processdocuments.svg +0 -0
  258. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/qwen-color.png +0 -0
  259. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/select_dynamic_row.png +0 -0
  260. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/startloop.png +0 -0
  261. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/tools.png +0 -0
  262. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/widgetFactory.svg +0 -0
  263. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/AAIT/widgets/icons/zip.svg +0 -0
  264. {aait-2.3.12 → aait-2.3.12.1}/orangecontrib/__init__.py +0 -0
  265. {aait-2.3.12 → aait-2.3.12.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aait
3
- Version: 2.3.12
3
+ Version: 2.3.12.1
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aait
3
- Version: 2.3.12
3
+ Version: 2.3.12.1
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
@@ -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
- 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)
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, argself=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. The model architecture you tried to use is most "
189
- f"likely not supported yet.\n\nModel name: {ntpath.basename(model_path)}"
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 ValueError as e:
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.create_completion(prompt=prompt, **gen_kwargs)
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
- # def generate_conversation(table, model, model_path, conversation="", progress_callback=None, argself=None):
318
- # """
319
- # Generates a response using a language model and appends it to a conversation.
320
- #
321
- # Parameters:
322
- # ----------
323
- # table (Orange.data.Table) Input data table. The first row should contain at least a "prompt" column, and optionally
324
- # "system prompt" and "assistant prompt" columns for context.
325
- #
326
- # model (GPT4All) : Loaded language model instance, compatible with GPT4All or llama.cpp-style interfaces.
327
- #
328
- # model_path (str) : Path or name of the model, used for selecting the appropriate prompt template.
329
- #
330
- # conversation (str, optional) : Existing conversation string to append the new response to. Defaults to an empty string.
331
- #
332
- # progress_callback (callable, optional) : Callback function for UI updates during generation. Called with progress percentage and message.
333
- #
334
- # argself (object, optional) : Extra argument passed to `run_query`, typically the widget instance (used for context or settings).
335
- #
336
- # Returns:
337
- # -------
338
- # Orange.data.Table
339
- # A new Orange Table containing the original input row with two new meta columns:
340
- # - "Answer": the model's generated response.
341
- # - "Conversation": the updated full conversation string.
342
- # """
343
- # if table is None:
344
- # return
345
- #
346
- # # Copy of input data
347
- # data = copy.deepcopy(table)
348
- # attr_dom = list(data.domain.attributes)
349
- # metas_dom = list(data.domain.metas)
350
- # class_dom = list(data.domain.class_vars)
351
- #
352
- # features = list(data[0])
353
- # metas = list(data.metas[0])
354
- #
355
- # # Get data from the first row of the Data Table
356
- # system_prompt = data[0]["system prompt"].value if "system prompt" in data.domain else ""
357
- # assistant_prompt = data[0]["assistant prompt"].value if "assistant prompt" in data.domain else ""
358
- # user_prompt = data[0]["prompt"].value
359
- #
360
- # # Build prompt based on the model name
361
- # prompt = prompt_management.apply_prompt_template(model_path, user_prompt=user_prompt, assistant_prompt=assistant_prompt, system_prompt=system_prompt)
362
- # answer = run_query(prompt, model=model, argself=argself, progress_callback=progress_callback)
363
- # conversation += "### Assistant :\n\n" + answer + "\n\n\n\n"
364
- #
365
- # # Add spaces to the widget for following answers
366
- # progress_callback((100, "\n\n\n\n"))
367
- #
368
- # # Generate new Domain to add to data
369
- # metas += [answer, conversation]
370
- # row = [features + metas]
371
- # answer_dom = [StringVariable("Answer"), StringVariable("Conversation")]
372
- #
373
- # # Create and return table
374
- # domain = Domain(attributes=attr_dom, metas=metas_dom + answer_dom, class_vars=class_dom)
375
- # out_data = Table.from_list(domain=domain, rows=row)
376
- # return out_data
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 .md file."
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})"
@@ -91,4 +91,8 @@ def sleep_seconds(seconds: float):
91
91
  """
92
92
  if seconds <= 0:
93
93
  return
94
- time.sleep(seconds)
94
+ time.sleep(seconds)
95
+
96
+ def set_proxy(proxy: str):
97
+ os.environ["http_proxy"] = proxy
98
+ os.environ["https_proxy"] = proxy
@@ -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 = "Ajoute des colonnes choisies (OS/Python/Orange/paquets...) à une Table en entrée."
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(widget.OWWidget):
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(300)
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 = "Fusionne deux Tables sur une clé; ajoute les non-appariées"
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 = "Génère des documents Word avec remplacements et tableaux"
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("4096")
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)