sunholo 0.118.10__tar.gz → 0.119.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 (184) hide show
  1. {sunholo-0.118.10/src/sunholo.egg-info → sunholo-0.119.1}/PKG-INFO +4 -3
  2. {sunholo-0.118.10 → sunholo-0.119.1}/pyproject.toml +6 -5
  3. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/discovery_engine/chunker_handler.py +6 -4
  4. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/discovery_engine/discovery_engine_client.py +143 -16
  5. {sunholo-0.118.10 → sunholo-0.119.1/src/sunholo.egg-info}/PKG-INFO +4 -3
  6. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo.egg-info/requires.txt +3 -2
  7. {sunholo-0.118.10 → sunholo-0.119.1}/LICENSE.txt +0 -0
  8. {sunholo-0.118.10 → sunholo-0.119.1}/MANIFEST.in +0 -0
  9. {sunholo-0.118.10 → sunholo-0.119.1}/README.md +0 -0
  10. {sunholo-0.118.10 → sunholo-0.119.1}/setup.cfg +0 -0
  11. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/__init__.py +0 -0
  12. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/__init__.py +0 -0
  13. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/chat_history.py +0 -0
  14. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/dispatch_to_qa.py +0 -0
  15. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/fastapi/__init__.py +0 -0
  16. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/fastapi/base.py +0 -0
  17. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/fastapi/qna_routes.py +0 -0
  18. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/flask/__init__.py +0 -0
  19. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/flask/base.py +0 -0
  20. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/flask/qna_routes.py +0 -0
  21. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/flask/vac_routes.py +0 -0
  22. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/langserve.py +0 -0
  23. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/pubsub.py +0 -0
  24. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/route.py +0 -0
  25. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/special_commands.py +0 -0
  26. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/agents/swagger.py +0 -0
  27. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/archive/__init__.py +0 -0
  28. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/archive/archive.py +0 -0
  29. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/auth/__init__.py +0 -0
  30. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/auth/gcloud.py +0 -0
  31. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/auth/refresh.py +0 -0
  32. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/auth/run.py +0 -0
  33. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/azure/__init__.py +0 -0
  34. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/azure/auth.py +0 -0
  35. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/azure/blobs.py +0 -0
  36. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/azure/event_grid.py +0 -0
  37. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/bots/__init__.py +0 -0
  38. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/bots/discord.py +0 -0
  39. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/bots/github_webhook.py +0 -0
  40. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/bots/webapp.py +0 -0
  41. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/__init__.py +0 -0
  42. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/azure.py +0 -0
  43. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/doc_handling.py +0 -0
  44. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/encode_metadata.py +0 -0
  45. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/images.py +0 -0
  46. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/loaders.py +0 -0
  47. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/message_data.py +0 -0
  48. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/pdfs.py +0 -0
  49. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/process_chunker_data.py +0 -0
  50. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/publish.py +0 -0
  51. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/pubsub.py +0 -0
  52. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/chunker/splitter.py +0 -0
  53. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/__init__.py +0 -0
  54. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/chat_vac.py +0 -0
  55. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/cli.py +0 -0
  56. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/cli_init.py +0 -0
  57. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/configs.py +0 -0
  58. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/deploy.py +0 -0
  59. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/embedder.py +0 -0
  60. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/merge_texts.py +0 -0
  61. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/run_proxy.py +0 -0
  62. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/sun_rich.py +0 -0
  63. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/swagger.py +0 -0
  64. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/cli/vertex.py +0 -0
  65. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/components/__init__.py +0 -0
  66. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/components/llm.py +0 -0
  67. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/components/retriever.py +0 -0
  68. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/components/vectorstore.py +0 -0
  69. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/custom_logging.py +0 -0
  70. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/__init__.py +0 -0
  71. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/alloydb.py +0 -0
  72. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/alloydb_client.py +0 -0
  73. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/database.py +0 -0
  74. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/lancedb.py +0 -0
  75. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/sql/sb/create_function.sql +0 -0
  76. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/sql/sb/create_function_time.sql +0 -0
  77. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/sql/sb/create_table.sql +0 -0
  78. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/sql/sb/delete_source_row.sql +0 -0
  79. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/sql/sb/return_sources.sql +0 -0
  80. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/sql/sb/setup.sql +0 -0
  81. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/static_dbs.py +0 -0
  82. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/database/uuid.py +0 -0
  83. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/discovery_engine/__init__.py +0 -0
  84. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/discovery_engine/create_new.py +0 -0
  85. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/discovery_engine/get_ai_search_chunks.py +0 -0
  86. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/embedder/__init__.py +0 -0
  87. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/embedder/embed_chunk.py +0 -0
  88. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/excel/__init__.py +0 -0
  89. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/excel/plugin.py +0 -0
  90. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/gcs/__init__.py +0 -0
  91. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/gcs/add_file.py +0 -0
  92. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/gcs/download_folder.py +0 -0
  93. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/gcs/download_url.py +0 -0
  94. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/gcs/extract_and_sign.py +0 -0
  95. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/gcs/metadata.py +0 -0
  96. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/genai/__init__.py +0 -0
  97. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/genai/file_handling.py +0 -0
  98. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/genai/genaiv2.py +0 -0
  99. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/genai/images.py +0 -0
  100. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/genai/init.py +0 -0
  101. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/genai/process_funcs_cls.py +0 -0
  102. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/genai/safety.py +0 -0
  103. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/invoke/__init__.py +0 -0
  104. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/invoke/async_class.py +0 -0
  105. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/invoke/direct_vac_func.py +0 -0
  106. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/invoke/invoke_vac_utils.py +0 -0
  107. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/langchain_types.py +0 -0
  108. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/langfuse/__init__.py +0 -0
  109. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/langfuse/callback.py +0 -0
  110. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/langfuse/evals.py +0 -0
  111. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/langfuse/prompts.py +0 -0
  112. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/llamaindex/__init__.py +0 -0
  113. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/llamaindex/get_files.py +0 -0
  114. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/llamaindex/import_files.py +0 -0
  115. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/llamaindex/llamaindex_class.py +0 -0
  116. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/llamaindex/user_history.py +0 -0
  117. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/lookup/__init__.py +0 -0
  118. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/lookup/model_lookup.yaml +0 -0
  119. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/mcp/__init__.py +0 -0
  120. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/mcp/cli.py +0 -0
  121. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/pubsub/__init__.py +0 -0
  122. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/pubsub/process_pubsub.py +0 -0
  123. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/pubsub/pubsub_manager.py +0 -0
  124. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/qna/__init__.py +0 -0
  125. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/qna/parsers.py +0 -0
  126. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/qna/retry.py +0 -0
  127. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/senses/__init__.py +0 -0
  128. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/senses/stream_voice.py +0 -0
  129. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/streaming/__init__.py +0 -0
  130. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/streaming/content_buffer.py +0 -0
  131. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/streaming/langserve.py +0 -0
  132. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/streaming/stream_lookup.py +0 -0
  133. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/streaming/streaming.py +0 -0
  134. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/summarise/__init__.py +0 -0
  135. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/summarise/summarise.py +0 -0
  136. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/agent/__init__.py +0 -0
  137. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/agent/agent_service.py +0 -0
  138. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/agent/app.py +0 -0
  139. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/agent/my_log.py +0 -0
  140. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/agent/tools/__init__.py +0 -0
  141. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/agent/tools/your_agent.py +0 -0
  142. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/agent/vac_service.py +0 -0
  143. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/project/__init__.py +0 -0
  144. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/project/app.py +0 -0
  145. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/project/my_log.py +0 -0
  146. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/project/vac_service.py +0 -0
  147. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/system_services/__init__.py +0 -0
  148. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/system_services/app.py +0 -0
  149. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/templates/system_services/my_log.py +0 -0
  150. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/terraform/__init__.py +0 -0
  151. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/terraform/tfvars_editor.py +0 -0
  152. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/tools/__init__.py +0 -0
  153. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/tools/web_browser.py +0 -0
  154. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/__init__.py +0 -0
  155. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/api_key.py +0 -0
  156. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/big_context.py +0 -0
  157. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/config.py +0 -0
  158. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/config_class.py +0 -0
  159. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/config_schema.py +0 -0
  160. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/gcp.py +0 -0
  161. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/gcp_project.py +0 -0
  162. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/mime.py +0 -0
  163. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/parsers.py +0 -0
  164. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/timedelta.py +0 -0
  165. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/user_ids.py +0 -0
  166. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/utils/version.py +0 -0
  167. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/vertex/__init__.py +0 -0
  168. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/vertex/extensions_call.py +0 -0
  169. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/vertex/extensions_class.py +0 -0
  170. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/vertex/genai_functions.py +0 -0
  171. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/vertex/init.py +0 -0
  172. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/vertex/memory_tools.py +0 -0
  173. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/vertex/safety.py +0 -0
  174. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo/vertex/type_dict_to_json.py +0 -0
  175. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo.egg-info/SOURCES.txt +0 -0
  176. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo.egg-info/dependency_links.txt +0 -0
  177. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo.egg-info/entry_points.txt +0 -0
  178. {sunholo-0.118.10 → sunholo-0.119.1}/src/sunholo.egg-info/top_level.txt +0 -0
  179. {sunholo-0.118.10 → sunholo-0.119.1}/tests/test_async.py +0 -0
  180. {sunholo-0.118.10 → sunholo-0.119.1}/tests/test_async_genai2.py +0 -0
  181. {sunholo-0.118.10 → sunholo-0.119.1}/tests/test_chat_history.py +0 -0
  182. {sunholo-0.118.10 → sunholo-0.119.1}/tests/test_config.py +0 -0
  183. {sunholo-0.118.10 → sunholo-0.119.1}/tests/test_genai2.py +0 -0
  184. {sunholo-0.118.10 → sunholo-0.119.1}/tests/test_unstructured.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: sunholo
3
- Version: 0.118.10
3
+ Version: 0.119.1
4
4
  Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
5
5
  Author-email: Holosun ApS <multivac@sunholo.com>
6
6
  License: Apache License, Version 2.0
@@ -20,6 +20,7 @@ Description-Content-Type: text/markdown
20
20
  License-File: LICENSE.txt
21
21
  Requires-Dist: aiohttp
22
22
  Requires-Dist: google-auth
23
+ Requires-Dist: google-cloud-discoveryengine>=0.13.4
23
24
  Requires-Dist: pydantic
24
25
  Requires-Dist: requests
25
26
  Requires-Dist: ruamel.yaml
@@ -47,7 +48,7 @@ Requires-Dist: google-cloud-service-control; extra == "all"
47
48
  Requires-Dist: google-cloud-logging; extra == "all"
48
49
  Requires-Dist: google-cloud-storage; extra == "all"
49
50
  Requires-Dist: google-cloud-pubsub; extra == "all"
50
- Requires-Dist: google-cloud-discoveryengine; extra == "all"
51
+ Requires-Dist: google-cloud-discoveryengine>=0.13.4; extra == "all"
51
52
  Requires-Dist: google-cloud-texttospeech; extra == "all"
52
53
  Requires-Dist: google-generativeai>=0.7.1; extra == "all"
53
54
  Requires-Dist: google-genai; extra == "all"
@@ -133,7 +134,7 @@ Requires-Dist: google-cloud-service-control; extra == "gcp"
133
134
  Requires-Dist: google-cloud-storage; extra == "gcp"
134
135
  Requires-Dist: google-cloud-logging; extra == "gcp"
135
136
  Requires-Dist: google-cloud-pubsub; extra == "gcp"
136
- Requires-Dist: google-cloud-discoveryengine; extra == "gcp"
137
+ Requires-Dist: google-cloud-discoveryengine>=0.13.4; extra == "gcp"
137
138
  Requires-Dist: google-cloud-texttospeech; extra == "gcp"
138
139
  Requires-Dist: google-genai; extra == "gcp"
139
140
  Requires-Dist: google-generativeai>=0.8.3; extra == "gcp"
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sunholo"
7
- version = "0.118.10"
7
+ version = "0.119.1"
8
8
  description = "Large Language Model DevOps - a package to help deploy LLMs to the Cloud."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -27,10 +27,11 @@ classifiers = [
27
27
  dependencies = [
28
28
  "aiohttp",
29
29
  "google-auth",
30
+ "google-cloud-discoveryengine>=0.13.4",
30
31
  "pydantic",
31
32
  "requests",
32
33
  "ruamel.yaml",
33
- "tenacity"
34
+ "tenacity",
34
35
  ]
35
36
 
36
37
  [project.urls]
@@ -78,7 +79,7 @@ all = [
78
79
  "google-cloud-logging",
79
80
  "google-cloud-storage",
80
81
  "google-cloud-pubsub",
81
- "google-cloud-discoveryengine",
82
+ "google-cloud-discoveryengine>=0.13.4",
82
83
  "google-cloud-texttospeech",
83
84
  "google-generativeai>=0.7.1",
84
85
  "google-genai",
@@ -170,7 +171,7 @@ gcp = [
170
171
  "google-cloud-storage",
171
172
  "google-cloud-logging",
172
173
  "google-cloud-pubsub",
173
- "google-cloud-discoveryengine",
174
+ "google-cloud-discoveryengine>=0.13.4",
174
175
  "google-cloud-texttospeech",
175
176
  "google-genai",
176
177
  "google-generativeai>=0.8.3",
@@ -213,4 +214,4 @@ tts = [
213
214
  "numpy",
214
215
  "sounddevice"
215
216
  ]
216
- video = ["opencv-python"]
217
+ video = ["opencv-python"]
@@ -65,8 +65,9 @@ def do_discovery_engine(message_data:str, metadata:dict, config:ConfigManager=No
65
65
  return None
66
66
  for corp in corpuses:
67
67
  try:
68
- response = corp.import_documents(
69
- gcs_uri=message_data
68
+ response = corp.import_document_with_metadata(
69
+ gcs_uri=message_data,
70
+ metadata=metadata
70
71
  )
71
72
  log.info(f"Imported file to corpus: {response} with metadata: {metadata}")
72
73
  except Exception as err:
@@ -81,8 +82,9 @@ def do_discovery_engine(message_data:str, metadata:dict, config:ConfigManager=No
81
82
  continue
82
83
  if new_corp:
83
84
  log.info(f"Found new DiscoveryEngine {config.vector_name=} - {new_corp=}")
84
- response = corp.import_documents(
85
- gcs_uri=message_data
85
+ response = corp.import_document_with_metadata(
86
+ gcs_uri=message_data,
87
+ metadata=metadata
86
88
  )
87
89
 
88
90
  continue
@@ -1,6 +1,6 @@
1
1
  try:
2
2
  from google.api_core.client_options import ClientOptions
3
- from google.cloud import discoveryengine_v1alpha as discoveryengine
3
+ from google.cloud import discoveryengine
4
4
  from google.api_core.retry import Retry, if_exception_type
5
5
  from google.api_core.exceptions import ResourceExhausted, AlreadyExists
6
6
  from google.cloud.discoveryengine_v1alpha import SearchResponse, Chunk
@@ -13,6 +13,9 @@ except ImportError:
13
13
  from ..custom_logging import log
14
14
  from typing import Optional, List
15
15
  import asyncio
16
+ import json
17
+ import uuid
18
+ from ..utils.mime import guess_mime_type
16
19
 
17
20
  class DiscoveryEngineClient:
18
21
  """
@@ -431,7 +434,37 @@ class DiscoveryEngineClient:
431
434
 
432
435
  return operation.operation.name
433
436
 
437
+ def _import_document_request(self,
438
+ request: discoveryengine.ImportDocumentsRequest # type: ignore
439
+ ) -> str:
440
+ """
441
+ Handles the common logic for making an ImportDocumentsRequest, including retrying.
434
442
 
443
+ Args:
444
+ request (discoveryengine.ImportDocumentsRequest): The prepared request object.
445
+
446
+ Returns:
447
+ str: The operation name.
448
+ """
449
+ @self.my_retry()
450
+ def import_documents_with_retry(doc_client, request):
451
+ return doc_client.import_documents(request=request)
452
+
453
+ try:
454
+ operation = import_documents_with_retry(self.doc_client, request)
455
+ except ResourceExhausted as e:
456
+ log.error(f"DiscoveryEngine Operation failed after retries due to quota exceeded: {e}")
457
+ raise e
458
+ except AlreadyExists as e:
459
+ # Extract relevant info from the request to log
460
+ gcs_uri = request.gcs_source.input_uris if request.gcs_source else None
461
+ bigquery_table = request.bigquery_source.table_id if request.bigquery_source else None
462
+ log.warning(f"DiscoveryEngine - Already exists: {e} - {gcs_uri=} {bigquery_table=}")
463
+ except Exception as e:
464
+ log.error(f"An unexpected DiscoveryEngine error occurred: {e}")
465
+ raise e
466
+
467
+ return operation.operation.name
435
468
 
436
469
  def import_documents(self,
437
470
  gcs_uri: Optional[str] = None,
@@ -479,23 +512,117 @@ class DiscoveryEngineClient:
479
512
  )
480
513
 
481
514
  # Make the request
482
- @self.my_retry()
483
- def import_documents_with_retry(doc_client, request):
484
- return doc_client.import_documents(request=request)
485
-
486
- try:
487
- operation = import_documents_with_retry(self.doc_client, request)
488
- except ResourceExhausted as e:
489
- log.error(f"DiscoveryEngine Operation failed after retries due to quota exceeded: {e}")
515
+ return self._import_document_request(request)
490
516
 
491
- raise e
492
- except AlreadyExists as e:
493
- log.warning(f"DiscoveryEngine - Already exists: {e} - {gcs_uri=} {bigquery_table=}")
494
517
 
495
- except Exception as e:
496
- log.error(f"An unexpected DiscoveryEngine error occurred: {e}")
518
+ def import_documents_with_metadata(self, gcs_uri: str, data_schema="content", branch="default_branch"):
519
+ """
520
+ Supply a JSONLD GCS location to import all the GS URIs within and their metadata
521
+ """
522
+ parent = self.doc_client.branch_path(
523
+ self.project_id,
524
+ self.location,
525
+ self.data_store_id,
526
+ branch
527
+ )
497
528
 
498
- raise e
529
+ # 1. Prepare your documents with metadata:
530
+ documents_with_metadata = []
531
+ with open(gcs_uri, 'r') as f: # Assuming one JSON object per line in your GCS file
532
+ for line in f:
533
+ try:
534
+ document_data = json.loads(line) # Load the JSON from the line
535
+ # Check if it has the required fields, if not create them
536
+ if "id" not in document_data:
537
+ document_data["id"] = str(uuid.uuid4())
538
+ if "structData" not in document_data:
539
+ document_data["structData"] = {}
540
+ if "content" not in document_data:
541
+ document_data["content"] = {}
542
+ # Create the Document object with your metadata
543
+ document = discoveryengine.Document(
544
+ name = f"{parent}/documents/{document_data['id']}", # important!
545
+ id=document_data["id"],
546
+ struct_data=document_data.get("structData", {}), # Your metadata here
547
+ content = discoveryengine.Content(
548
+ mime_type = document_data.get("content", {}).get("mimeType", "text/plain"),
549
+ uri = document_data.get("content", {}).get("uri", ""),
550
+ )
551
+ )
552
+
553
+ if "jsonData" in document_data:
554
+ document.json_data = document_data["jsonData"]
555
+
556
+ documents_with_metadata.append(document)
557
+
558
+ except json.JSONDecodeError as e:
559
+ log.error(f"Error decoding JSON in line: {line.strip()}. Error: {e}")
560
+ continue # Skip to the next line if there's an error
561
+
562
+ # 2. Use InlineSource to import:
563
+ request = discoveryengine.ImportDocumentsRequest(
564
+ parent=parent,
565
+ inline_source=discoveryengine.ImportDocumentsRequest.InlineSource(
566
+ documents=documents_with_metadata, # Pass the list of Document objects
567
+ data_schema="document" # Important: Set to "document" when providing full Documents
568
+ ),
569
+ reconciliation_mode=discoveryengine.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL,
570
+ )
499
571
 
500
- return operation.operation.name
572
+ return self._import_document_request(request)
573
+
574
+
575
+ def import_document_with_metadata(self, gcs_uri: str, metadata: dict, branch="default_branch"):
576
+ """
577
+ Imports a single document with metadata.
578
+
579
+ Args:
580
+ gcs_uri: The GCS URI of the document to import.
581
+ metadata: A dictionary containing the metadata for the document.
582
+ branch: The branch to import the document into.
501
583
 
584
+ Returns:
585
+ str: The operation name.
586
+ """
587
+ try:
588
+ # 1. Generate a unique document ID
589
+ document_id = str(uuid.uuid4())
590
+
591
+ # 2. Create a Document object
592
+ parent = self.doc_client.branch_path(
593
+ self.project_id, self.location, self.data_store_id, branch
594
+ )
595
+ document = discoveryengine.Document(
596
+ name=f"{parent}/documents/{document_id}",
597
+ id=document_id,
598
+ struct_data=metadata,
599
+ content=discoveryengine.Document.Content(
600
+ uri=gcs_uri,
601
+ mime_type=self.get_mime_type(gcs_uri)
602
+ )
603
+ )
604
+
605
+ # 3. Use InlineSource for import
606
+ request = discoveryengine.ImportDocumentsRequest(
607
+ parent=parent,
608
+ inline_source=discoveryengine.ImportDocumentsRequest.InlineSource(
609
+ documents=[document],
610
+ data_schema="document"
611
+ ),
612
+ reconciliation_mode=discoveryengine.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL
613
+ )
614
+
615
+ # 4. Make the import request (using the common method)
616
+ return self._import_document_request(request)
617
+
618
+ except Exception as e:
619
+ log.error(f"Error importing document with metadata: {e}")
620
+
621
+ def get_mime_type(self, uri:str):
622
+ return guess_mime_type(uri)
623
+
624
+ def search_with_filters(self, query, folder=None, date=None,
625
+ num_previous_chunks=3, num_next_chunks=3,
626
+ page_size=10, parse_chunks_to_string=True,
627
+ serving_config="default_serving_config"):
628
+ pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: sunholo
3
- Version: 0.118.10
3
+ Version: 0.119.1
4
4
  Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
5
5
  Author-email: Holosun ApS <multivac@sunholo.com>
6
6
  License: Apache License, Version 2.0
@@ -20,6 +20,7 @@ Description-Content-Type: text/markdown
20
20
  License-File: LICENSE.txt
21
21
  Requires-Dist: aiohttp
22
22
  Requires-Dist: google-auth
23
+ Requires-Dist: google-cloud-discoveryengine>=0.13.4
23
24
  Requires-Dist: pydantic
24
25
  Requires-Dist: requests
25
26
  Requires-Dist: ruamel.yaml
@@ -47,7 +48,7 @@ Requires-Dist: google-cloud-service-control; extra == "all"
47
48
  Requires-Dist: google-cloud-logging; extra == "all"
48
49
  Requires-Dist: google-cloud-storage; extra == "all"
49
50
  Requires-Dist: google-cloud-pubsub; extra == "all"
50
- Requires-Dist: google-cloud-discoveryengine; extra == "all"
51
+ Requires-Dist: google-cloud-discoveryengine>=0.13.4; extra == "all"
51
52
  Requires-Dist: google-cloud-texttospeech; extra == "all"
52
53
  Requires-Dist: google-generativeai>=0.7.1; extra == "all"
53
54
  Requires-Dist: google-genai; extra == "all"
@@ -133,7 +134,7 @@ Requires-Dist: google-cloud-service-control; extra == "gcp"
133
134
  Requires-Dist: google-cloud-storage; extra == "gcp"
134
135
  Requires-Dist: google-cloud-logging; extra == "gcp"
135
136
  Requires-Dist: google-cloud-pubsub; extra == "gcp"
136
- Requires-Dist: google-cloud-discoveryengine; extra == "gcp"
137
+ Requires-Dist: google-cloud-discoveryengine>=0.13.4; extra == "gcp"
137
138
  Requires-Dist: google-cloud-texttospeech; extra == "gcp"
138
139
  Requires-Dist: google-genai; extra == "gcp"
139
140
  Requires-Dist: google-generativeai>=0.8.3; extra == "gcp"
@@ -1,5 +1,6 @@
1
1
  aiohttp
2
2
  google-auth
3
+ google-cloud-discoveryengine>=0.13.4
3
4
  pydantic
4
5
  requests
5
6
  ruamel.yaml
@@ -25,7 +26,7 @@ google-cloud-service-control
25
26
  google-cloud-logging
26
27
  google-cloud-storage
27
28
  google-cloud-pubsub
28
- google-cloud-discoveryengine
29
+ google-cloud-discoveryengine>=0.13.4
29
30
  google-cloud-texttospeech
30
31
  google-generativeai>=0.7.1
31
32
  google-genai
@@ -109,7 +110,7 @@ google-cloud-service-control
109
110
  google-cloud-storage
110
111
  google-cloud-logging
111
112
  google-cloud-pubsub
112
- google-cloud-discoveryengine
113
+ google-cloud-discoveryengine>=0.13.4
113
114
  google-cloud-texttospeech
114
115
  google-genai
115
116
  google-generativeai>=0.8.3
File without changes
File without changes
File without changes
File without changes