sunholo 0.140.12__tar.gz → 0.141.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.
- {sunholo-0.140.12/src/sunholo.egg-info → sunholo-0.141.1}/PKG-INFO +78 -48
- {sunholo-0.140.12 → sunholo-0.141.1}/README.md +77 -47
- {sunholo-0.140.12 → sunholo-0.141.1}/pyproject.toml +1 -1
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/chat_history.py +2 -2
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/discovery_engine/discovery_engine_client.py +1 -1
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/mime.py +14 -2
- sunholo-0.141.1/src/sunholo/utils/proto_convert.py +25 -0
- {sunholo-0.140.12 → sunholo-0.141.1/src/sunholo.egg-info}/PKG-INFO +78 -48
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo.egg-info/SOURCES.txt +1 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/LICENSE.txt +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/MANIFEST.in +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/setup.cfg +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/dispatch_to_qa.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/fastapi/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/fastapi/base.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/fastapi/qna_routes.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/flask/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/flask/base.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/flask/vac_routes.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/langserve.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/pubsub.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/route.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/special_commands.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/agents/swagger.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/archive/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/archive/archive.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/auth/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/auth/gcloud.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/auth/refresh.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/auth/run.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/azure/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/azure/auth.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/azure/blobs.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/azure/event_grid.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/bots/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/bots/discord.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/bots/github_webhook.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/bots/webapp.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/azure.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/doc_handling.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/encode_metadata.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/images.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/loaders.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/message_data.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/pdfs.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/process_chunker_data.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/publish.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/pubsub.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/chunker/splitter.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/chat_vac.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/cli.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/cli_init.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/configs.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/deploy.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/embedder.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/merge_texts.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/run_proxy.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/sun_rich.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/swagger.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/cli/vertex.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/components/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/components/llm.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/components/retriever.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/components/vectorstore.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/custom_logging.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/alloydb.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/alloydb_client.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/database.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/lancedb.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/sql/sb/create_function.sql +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/sql/sb/create_function_time.sql +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/sql/sb/create_table.sql +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/sql/sb/delete_source_row.sql +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/sql/sb/return_sources.sql +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/sql/sb/setup.sql +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/static_dbs.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/database/uuid.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/discovery_engine/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/discovery_engine/chunker_handler.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/discovery_engine/cli.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/discovery_engine/create_new.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/discovery_engine/get_ai_search_chunks.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/embedder/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/embedder/embed_chunk.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/embedder/embed_metadata.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/excel/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/excel/plugin.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/gcs/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/gcs/add_file.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/gcs/download_folder.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/gcs/download_gcs_text.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/gcs/download_url.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/gcs/extract_and_sign.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/gcs/metadata.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/genai/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/genai/file_handling.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/genai/genaiv2.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/genai/images.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/genai/init.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/genai/process_funcs_cls.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/genai/safety.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/invoke/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/invoke/async_class.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/invoke/direct_vac_func.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/invoke/invoke_vac_utils.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/langchain_types.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/langfuse/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/langfuse/callback.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/langfuse/evals.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/langfuse/prompts.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/llamaindex/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/llamaindex/get_files.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/llamaindex/import_files.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/llamaindex/llamaindex_class.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/llamaindex/user_history.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/lookup/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/lookup/model_lookup.yaml +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/mcp/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/mcp/cli.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/ollama/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/ollama/ollama_images.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/pubsub/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/pubsub/process_pubsub.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/pubsub/pubsub_manager.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/qna/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/qna/parsers.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/qna/retry.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/senses/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/senses/stream_voice.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/streaming/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/streaming/content_buffer.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/streaming/langserve.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/streaming/stream_lookup.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/streaming/streaming.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/summarise/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/summarise/summarise.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/agent/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/agent/agent_service.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/agent/app.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/agent/my_log.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/agent/tools/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/agent/tools/your_agent.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/agent/vac_service.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/project/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/project/app.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/project/my_log.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/project/vac_service.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/system_services/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/system_services/app.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/templates/system_services/my_log.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/terraform/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/terraform/tfvars_editor.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/tools/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/tools/web_browser.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/api_key.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/big_context.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/config.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/config_class.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/config_schema.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/gcp.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/gcp_project.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/parsers.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/timedelta.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/user_ids.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/utils/version.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/vertex/__init__.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/vertex/extensions_call.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/vertex/extensions_class.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/vertex/genai_functions.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/vertex/init.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/vertex/memory_tools.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/vertex/safety.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/vertex/type_dict_to_json.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo.egg-info/dependency_links.txt +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo.egg-info/entry_points.txt +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo.egg-info/requires.txt +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo.egg-info/top_level.txt +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/tests/test_async.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/tests/test_async_genai2.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/tests/test_chat_history.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/tests/test_config.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/tests/test_genai2.py +0 -0
- {sunholo-0.140.12 → sunholo-0.141.1}/tests/test_unstructured.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: sunholo
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.141.1
|
4
4
|
Summary: AI DevOps - a package to help deploy GenAI to the Cloud.
|
5
5
|
Author-email: Holosun ApS <multivac@sunholo.com>
|
6
6
|
License: Apache License, Version 2.0
|
@@ -255,7 +255,7 @@ vac:
|
|
255
255
|
sunholo vac chat my-agent
|
256
256
|
```
|
257
257
|
|
258
|
-
4. **
|
258
|
+
4. **Run your agent as a local Flask app:**
|
259
259
|
```bash
|
260
260
|
sunholo deploy my-agent
|
261
261
|
```
|
@@ -369,102 +369,132 @@ vac:
|
|
369
369
|
|
370
370
|
```bash
|
371
371
|
# Project Management
|
372
|
-
sunholo init <project-name> # Create new project
|
372
|
+
sunholo init <project-name> # Create new project from template
|
373
373
|
sunholo list-configs # List all configurations
|
374
|
-
sunholo list-configs --validate # Validate
|
374
|
+
sunholo list-configs --validate # Validate configurations
|
375
375
|
|
376
376
|
# Development
|
377
377
|
sunholo vac chat <vac-name> # Chat with a VAC locally
|
378
|
-
sunholo vac list # List available VACs
|
378
|
+
sunholo vac list # List available VACs
|
379
|
+
sunholo vac get-url <vac-name> # Get Cloud Run URL for a VAC
|
379
380
|
sunholo proxy start <service> # Start local proxy to cloud service
|
380
|
-
|
381
|
-
#
|
382
|
-
sunholo deploy <vac-name> # Deploy to Cloud Run
|
383
|
-
sunholo deploy <vac-name> --dev # Deploy to dev environment
|
381
|
+
sunholo proxy list # List running proxies
|
382
|
+
sunholo deploy <vac-name> # Run Flask app locally
|
384
383
|
|
385
384
|
# Document Processing
|
386
|
-
sunholo embed <vac-name> #
|
385
|
+
sunholo embed <vac-name> # Process and embed documents
|
387
386
|
sunholo merge-text <folder> <output> # Merge files for context
|
388
387
|
|
389
388
|
# Cloud Services
|
390
|
-
sunholo discovery-engine create <name> # Create Discovery Engine
|
391
|
-
sunholo
|
389
|
+
sunholo discovery-engine create <name> # Create Discovery Engine instance
|
390
|
+
sunholo vertex list-extensions # List Vertex AI extensions
|
391
|
+
sunholo swagger <vac-name> # Generate OpenAPI spec
|
392
|
+
|
393
|
+
# Integration Tools
|
394
|
+
sunholo excel-init # Initialize Excel plugin
|
395
|
+
sunholo llamaindex <query> # Query with LlamaIndex
|
396
|
+
sunholo mcp list-tools # List MCP tools
|
397
|
+
sunholo tts <text> # Text-to-speech synthesis
|
392
398
|
```
|
393
399
|
|
394
400
|
## 📝 Examples
|
395
401
|
|
396
|
-
###
|
402
|
+
### Chat with History Extraction
|
397
403
|
|
398
404
|
```python
|
399
405
|
from sunholo.utils import ConfigManager
|
400
406
|
from sunholo.components import pick_llm
|
401
|
-
from sunholo.agents import
|
407
|
+
from sunholo.agents import extract_chat_history
|
402
408
|
|
403
409
|
config = ConfigManager('my-agent')
|
404
410
|
llm = pick_llm(config=config)
|
405
|
-
memory = memory_client(config=config)
|
406
411
|
|
407
|
-
#
|
408
|
-
|
409
|
-
|
410
|
-
|
412
|
+
# Extract chat history from messages
|
413
|
+
chat_history = [
|
414
|
+
{"role": "user", "content": "Hello"},
|
415
|
+
{"role": "assistant", "content": "Hi there!"}
|
416
|
+
]
|
417
|
+
history_str = extract_chat_history(chat_history)
|
418
|
+
|
419
|
+
# Use in prompt
|
420
|
+
response = llm.invoke(f"Given this history:\n{history_str}\n\nUser: How are you?")
|
411
421
|
```
|
412
422
|
|
413
|
-
### Document Processing with
|
423
|
+
### Document Processing with Chunker
|
414
424
|
|
415
425
|
```python
|
416
|
-
from sunholo.
|
417
|
-
from sunholo.
|
426
|
+
from sunholo.chunker import direct_file_to_embed
|
427
|
+
from sunholo.utils import ConfigManager
|
418
428
|
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
429
|
+
config = ConfigManager('my-agent')
|
430
|
+
|
431
|
+
# Process a file directly
|
432
|
+
result = direct_file_to_embed(
|
433
|
+
"document.pdf",
|
434
|
+
embed_prefix="doc",
|
435
|
+
metadata={"source": "user_upload"},
|
436
|
+
vectorstore=config.vacConfig("vectorstore")
|
423
437
|
)
|
438
|
+
```
|
424
439
|
|
425
|
-
|
426
|
-
chunks = chunk_doc.chunk_file("document.pdf", chunk_size=1000)
|
427
|
-
client.import_documents(chunks)
|
440
|
+
### Vertex AI with Memory Tools
|
428
441
|
|
429
|
-
|
430
|
-
|
442
|
+
```python
|
443
|
+
from sunholo.vertex import get_vertex_memories
|
444
|
+
from sunholo.utils import ConfigManager
|
445
|
+
|
446
|
+
config = ConfigManager('my-agent')
|
447
|
+
|
448
|
+
# Get Vertex AI memory configuration
|
449
|
+
memory_config = get_vertex_memories(config)
|
450
|
+
|
451
|
+
# Use with Vertex AI
|
452
|
+
if memory_config:
|
453
|
+
print(f"Memory tools configured: {memory_config}")
|
431
454
|
```
|
432
455
|
|
433
|
-
### Streaming Flask
|
456
|
+
### Streaming Response with Flask
|
434
457
|
|
435
458
|
```python
|
436
|
-
from sunholo.agents import
|
459
|
+
from sunholo.agents import send_to_qa
|
460
|
+
from flask import Response, request
|
437
461
|
|
438
462
|
@app.route('/vac/streaming/<vac_name>', methods=['POST'])
|
439
463
|
def streaming_endpoint(vac_name):
|
440
464
|
question = request.json.get('user_input')
|
441
465
|
|
442
466
|
def generate():
|
443
|
-
|
467
|
+
# Stream responses from the QA system
|
468
|
+
response = send_to_qa(
|
444
469
|
question,
|
445
470
|
vac_name=vac_name,
|
446
471
|
stream=True
|
447
|
-
)
|
448
|
-
|
472
|
+
)
|
473
|
+
if hasattr(response, '__iter__'):
|
474
|
+
for chunk in response:
|
475
|
+
yield f"data: {chunk}\n\n"
|
476
|
+
else:
|
477
|
+
yield f"data: {response}\n\n"
|
449
478
|
|
450
479
|
return Response(generate(), content_type='text/event-stream')
|
451
480
|
```
|
452
481
|
|
453
|
-
###
|
482
|
+
### Discovery Engine Integration
|
454
483
|
|
455
|
-
```
|
456
|
-
|
457
|
-
sunholo init my-api --template agent
|
458
|
-
|
459
|
-
# Customize configuration
|
460
|
-
cd my-api
|
461
|
-
vi config/vac_config.yaml
|
484
|
+
```python
|
485
|
+
from sunholo.discovery_engine import DiscoveryEngineClient
|
462
486
|
|
463
|
-
#
|
464
|
-
|
487
|
+
# Initialize client
|
488
|
+
client = DiscoveryEngineClient(
|
489
|
+
project_id='my-project',
|
490
|
+
data_store_id='my-datastore'
|
491
|
+
)
|
465
492
|
|
466
|
-
#
|
467
|
-
|
493
|
+
# Search documents
|
494
|
+
results = client.search("What is Vertex AI?")
|
495
|
+
for result in results:
|
496
|
+
print(f"Content: {result.chunk.content}")
|
497
|
+
print(f"Score: {result.relevance_score}")
|
468
498
|
```
|
469
499
|
|
470
500
|
## 🧪 Testing
|
@@ -69,7 +69,7 @@ vac:
|
|
69
69
|
sunholo vac chat my-agent
|
70
70
|
```
|
71
71
|
|
72
|
-
4. **
|
72
|
+
4. **Run your agent as a local Flask app:**
|
73
73
|
```bash
|
74
74
|
sunholo deploy my-agent
|
75
75
|
```
|
@@ -183,102 +183,132 @@ vac:
|
|
183
183
|
|
184
184
|
```bash
|
185
185
|
# Project Management
|
186
|
-
sunholo init <project-name> # Create new project
|
186
|
+
sunholo init <project-name> # Create new project from template
|
187
187
|
sunholo list-configs # List all configurations
|
188
|
-
sunholo list-configs --validate # Validate
|
188
|
+
sunholo list-configs --validate # Validate configurations
|
189
189
|
|
190
190
|
# Development
|
191
191
|
sunholo vac chat <vac-name> # Chat with a VAC locally
|
192
|
-
sunholo vac list # List available VACs
|
192
|
+
sunholo vac list # List available VACs
|
193
|
+
sunholo vac get-url <vac-name> # Get Cloud Run URL for a VAC
|
193
194
|
sunholo proxy start <service> # Start local proxy to cloud service
|
194
|
-
|
195
|
-
#
|
196
|
-
sunholo deploy <vac-name> # Deploy to Cloud Run
|
197
|
-
sunholo deploy <vac-name> --dev # Deploy to dev environment
|
195
|
+
sunholo proxy list # List running proxies
|
196
|
+
sunholo deploy <vac-name> # Run Flask app locally
|
198
197
|
|
199
198
|
# Document Processing
|
200
|
-
sunholo embed <vac-name> #
|
199
|
+
sunholo embed <vac-name> # Process and embed documents
|
201
200
|
sunholo merge-text <folder> <output> # Merge files for context
|
202
201
|
|
203
202
|
# Cloud Services
|
204
|
-
sunholo discovery-engine create <name> # Create Discovery Engine
|
205
|
-
sunholo
|
203
|
+
sunholo discovery-engine create <name> # Create Discovery Engine instance
|
204
|
+
sunholo vertex list-extensions # List Vertex AI extensions
|
205
|
+
sunholo swagger <vac-name> # Generate OpenAPI spec
|
206
|
+
|
207
|
+
# Integration Tools
|
208
|
+
sunholo excel-init # Initialize Excel plugin
|
209
|
+
sunholo llamaindex <query> # Query with LlamaIndex
|
210
|
+
sunholo mcp list-tools # List MCP tools
|
211
|
+
sunholo tts <text> # Text-to-speech synthesis
|
206
212
|
```
|
207
213
|
|
208
214
|
## 📝 Examples
|
209
215
|
|
210
|
-
###
|
216
|
+
### Chat with History Extraction
|
211
217
|
|
212
218
|
```python
|
213
219
|
from sunholo.utils import ConfigManager
|
214
220
|
from sunholo.components import pick_llm
|
215
|
-
from sunholo.agents import
|
221
|
+
from sunholo.agents import extract_chat_history
|
216
222
|
|
217
223
|
config = ConfigManager('my-agent')
|
218
224
|
llm = pick_llm(config=config)
|
219
|
-
memory = memory_client(config=config)
|
220
225
|
|
221
|
-
#
|
222
|
-
|
223
|
-
|
224
|
-
|
226
|
+
# Extract chat history from messages
|
227
|
+
chat_history = [
|
228
|
+
{"role": "user", "content": "Hello"},
|
229
|
+
{"role": "assistant", "content": "Hi there!"}
|
230
|
+
]
|
231
|
+
history_str = extract_chat_history(chat_history)
|
232
|
+
|
233
|
+
# Use in prompt
|
234
|
+
response = llm.invoke(f"Given this history:\n{history_str}\n\nUser: How are you?")
|
225
235
|
```
|
226
236
|
|
227
|
-
### Document Processing with
|
237
|
+
### Document Processing with Chunker
|
228
238
|
|
229
239
|
```python
|
230
|
-
from sunholo.
|
231
|
-
from sunholo.
|
240
|
+
from sunholo.chunker import direct_file_to_embed
|
241
|
+
from sunholo.utils import ConfigManager
|
232
242
|
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
243
|
+
config = ConfigManager('my-agent')
|
244
|
+
|
245
|
+
# Process a file directly
|
246
|
+
result = direct_file_to_embed(
|
247
|
+
"document.pdf",
|
248
|
+
embed_prefix="doc",
|
249
|
+
metadata={"source": "user_upload"},
|
250
|
+
vectorstore=config.vacConfig("vectorstore")
|
237
251
|
)
|
252
|
+
```
|
238
253
|
|
239
|
-
|
240
|
-
chunks = chunk_doc.chunk_file("document.pdf", chunk_size=1000)
|
241
|
-
client.import_documents(chunks)
|
254
|
+
### Vertex AI with Memory Tools
|
242
255
|
|
243
|
-
|
244
|
-
|
256
|
+
```python
|
257
|
+
from sunholo.vertex import get_vertex_memories
|
258
|
+
from sunholo.utils import ConfigManager
|
259
|
+
|
260
|
+
config = ConfigManager('my-agent')
|
261
|
+
|
262
|
+
# Get Vertex AI memory configuration
|
263
|
+
memory_config = get_vertex_memories(config)
|
264
|
+
|
265
|
+
# Use with Vertex AI
|
266
|
+
if memory_config:
|
267
|
+
print(f"Memory tools configured: {memory_config}")
|
245
268
|
```
|
246
269
|
|
247
|
-
### Streaming Flask
|
270
|
+
### Streaming Response with Flask
|
248
271
|
|
249
272
|
```python
|
250
|
-
from sunholo.agents import
|
273
|
+
from sunholo.agents import send_to_qa
|
274
|
+
from flask import Response, request
|
251
275
|
|
252
276
|
@app.route('/vac/streaming/<vac_name>', methods=['POST'])
|
253
277
|
def streaming_endpoint(vac_name):
|
254
278
|
question = request.json.get('user_input')
|
255
279
|
|
256
280
|
def generate():
|
257
|
-
|
281
|
+
# Stream responses from the QA system
|
282
|
+
response = send_to_qa(
|
258
283
|
question,
|
259
284
|
vac_name=vac_name,
|
260
285
|
stream=True
|
261
|
-
)
|
262
|
-
|
286
|
+
)
|
287
|
+
if hasattr(response, '__iter__'):
|
288
|
+
for chunk in response:
|
289
|
+
yield f"data: {chunk}\n\n"
|
290
|
+
else:
|
291
|
+
yield f"data: {response}\n\n"
|
263
292
|
|
264
293
|
return Response(generate(), content_type='text/event-stream')
|
265
294
|
```
|
266
295
|
|
267
|
-
###
|
296
|
+
### Discovery Engine Integration
|
268
297
|
|
269
|
-
```
|
270
|
-
|
271
|
-
sunholo init my-api --template agent
|
272
|
-
|
273
|
-
# Customize configuration
|
274
|
-
cd my-api
|
275
|
-
vi config/vac_config.yaml
|
298
|
+
```python
|
299
|
+
from sunholo.discovery_engine import DiscoveryEngineClient
|
276
300
|
|
277
|
-
#
|
278
|
-
|
301
|
+
# Initialize client
|
302
|
+
client = DiscoveryEngineClient(
|
303
|
+
project_id='my-project',
|
304
|
+
data_store_id='my-datastore'
|
305
|
+
)
|
279
306
|
|
280
|
-
#
|
281
|
-
|
307
|
+
# Search documents
|
308
|
+
results = client.search("What is Vertex AI?")
|
309
|
+
for result in results:
|
310
|
+
print(f"Content: {result.chunk.content}")
|
311
|
+
print(f"Score: {result.relevance_score}")
|
282
312
|
```
|
283
313
|
|
284
314
|
## 🧪 Testing
|
@@ -441,10 +441,10 @@ def create_message_element(message: dict):
|
|
441
441
|
```
|
442
442
|
"""
|
443
443
|
if 'text' in message: # This is a Slack or Google Chat message
|
444
|
-
log.info(f"Found text element - {message['text']}")
|
444
|
+
#log.info(f"Found text element - {message['text']}")
|
445
445
|
return message['text']
|
446
446
|
elif 'content' in message: # Discord or OpenAI history message
|
447
|
-
log.info(f"Found content element - {message['content']}")
|
447
|
+
#log.info(f"Found content element - {message['content']}")
|
448
448
|
return message['content']
|
449
449
|
else:
|
450
450
|
raise KeyError(f"Could not extract 'content' or 'text' element from message: {message}, {type(message)}")
|
{sunholo-0.140.12 → sunholo-0.141.1}/src/sunholo/discovery_engine/discovery_engine_client.py
RENAMED
@@ -280,7 +280,7 @@ class DiscoveryEngineClient:
|
|
280
280
|
# Use async_search_with_filters with filter_str=None to perform a regular search
|
281
281
|
return await self.async_search_with_filters(
|
282
282
|
query=query,
|
283
|
-
filter_str=
|
283
|
+
filter_str=filter_str,
|
284
284
|
num_previous_chunks=num_previous_chunks,
|
285
285
|
num_next_chunks=num_next_chunks,
|
286
286
|
page_size=page_size,
|
@@ -83,7 +83,6 @@ def get_mime_type_gemini(file_path:str) -> str:
|
|
83
83
|
|
84
84
|
# Define the mapping of extensions to MIME types
|
85
85
|
mime_types = {
|
86
|
-
|
87
86
|
# Images
|
88
87
|
'png': 'image/png',
|
89
88
|
'jpg': 'image/jpeg',
|
@@ -111,7 +110,20 @@ def get_mime_type_gemini(file_path:str) -> str:
|
|
111
110
|
'rtf': 'text/rtf',
|
112
111
|
|
113
112
|
# Special case: JSON files are treated as plain text
|
114
|
-
'json': 'text/plain'
|
113
|
+
'json': 'text/plain',
|
114
|
+
|
115
|
+
# Audio
|
116
|
+
'mp3': 'audio/mp3',
|
117
|
+
'mpeg': 'audio/mpeg',
|
118
|
+
'wav': 'audio/wav',
|
119
|
+
|
120
|
+
# Video
|
121
|
+
'mov': 'video/mov',
|
122
|
+
'mp4': 'video/mp4',
|
123
|
+
'mpg': 'video/mpeg',
|
124
|
+
'avi': 'video/avi',
|
125
|
+
'wmv': 'video/wmv',
|
126
|
+
'flv': 'video/flv'
|
115
127
|
}
|
116
128
|
|
117
129
|
# Return the appropriate MIME type, defaulting to None if unknown
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
def convert_composite_to_native(value):
|
4
|
+
"""
|
5
|
+
Recursively converts a proto MapComposite or RepeatedComposite object to native Python types.
|
6
|
+
|
7
|
+
Args:
|
8
|
+
value: The proto object, which could be a MapComposite, RepeatedComposite, or a primitive.
|
9
|
+
|
10
|
+
Returns:
|
11
|
+
The equivalent Python dictionary, list, or primitive type.
|
12
|
+
"""
|
13
|
+
import proto
|
14
|
+
|
15
|
+
if isinstance(value, proto.marshal.collections.maps.MapComposite):
|
16
|
+
# Convert MapComposite to a dictionary, recursively processing its values
|
17
|
+
return {key: convert_composite_to_native(val) for key, val in value.items()}
|
18
|
+
elif isinstance(value, proto.marshal.collections.repeated.RepeatedComposite):
|
19
|
+
# Convert RepeatedComposite to a list, recursively processing its elements
|
20
|
+
return [convert_composite_to_native(item) for item in value]
|
21
|
+
else:
|
22
|
+
# If it's a primitive value, return it as is
|
23
|
+
return value
|
24
|
+
|
25
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: sunholo
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.141.1
|
4
4
|
Summary: AI DevOps - a package to help deploy GenAI to the Cloud.
|
5
5
|
Author-email: Holosun ApS <multivac@sunholo.com>
|
6
6
|
License: Apache License, Version 2.0
|
@@ -255,7 +255,7 @@ vac:
|
|
255
255
|
sunholo vac chat my-agent
|
256
256
|
```
|
257
257
|
|
258
|
-
4. **
|
258
|
+
4. **Run your agent as a local Flask app:**
|
259
259
|
```bash
|
260
260
|
sunholo deploy my-agent
|
261
261
|
```
|
@@ -369,102 +369,132 @@ vac:
|
|
369
369
|
|
370
370
|
```bash
|
371
371
|
# Project Management
|
372
|
-
sunholo init <project-name> # Create new project
|
372
|
+
sunholo init <project-name> # Create new project from template
|
373
373
|
sunholo list-configs # List all configurations
|
374
|
-
sunholo list-configs --validate # Validate
|
374
|
+
sunholo list-configs --validate # Validate configurations
|
375
375
|
|
376
376
|
# Development
|
377
377
|
sunholo vac chat <vac-name> # Chat with a VAC locally
|
378
|
-
sunholo vac list # List available VACs
|
378
|
+
sunholo vac list # List available VACs
|
379
|
+
sunholo vac get-url <vac-name> # Get Cloud Run URL for a VAC
|
379
380
|
sunholo proxy start <service> # Start local proxy to cloud service
|
380
|
-
|
381
|
-
#
|
382
|
-
sunholo deploy <vac-name> # Deploy to Cloud Run
|
383
|
-
sunholo deploy <vac-name> --dev # Deploy to dev environment
|
381
|
+
sunholo proxy list # List running proxies
|
382
|
+
sunholo deploy <vac-name> # Run Flask app locally
|
384
383
|
|
385
384
|
# Document Processing
|
386
|
-
sunholo embed <vac-name> #
|
385
|
+
sunholo embed <vac-name> # Process and embed documents
|
387
386
|
sunholo merge-text <folder> <output> # Merge files for context
|
388
387
|
|
389
388
|
# Cloud Services
|
390
|
-
sunholo discovery-engine create <name> # Create Discovery Engine
|
391
|
-
sunholo
|
389
|
+
sunholo discovery-engine create <name> # Create Discovery Engine instance
|
390
|
+
sunholo vertex list-extensions # List Vertex AI extensions
|
391
|
+
sunholo swagger <vac-name> # Generate OpenAPI spec
|
392
|
+
|
393
|
+
# Integration Tools
|
394
|
+
sunholo excel-init # Initialize Excel plugin
|
395
|
+
sunholo llamaindex <query> # Query with LlamaIndex
|
396
|
+
sunholo mcp list-tools # List MCP tools
|
397
|
+
sunholo tts <text> # Text-to-speech synthesis
|
392
398
|
```
|
393
399
|
|
394
400
|
## 📝 Examples
|
395
401
|
|
396
|
-
###
|
402
|
+
### Chat with History Extraction
|
397
403
|
|
398
404
|
```python
|
399
405
|
from sunholo.utils import ConfigManager
|
400
406
|
from sunholo.components import pick_llm
|
401
|
-
from sunholo.agents import
|
407
|
+
from sunholo.agents import extract_chat_history
|
402
408
|
|
403
409
|
config = ConfigManager('my-agent')
|
404
410
|
llm = pick_llm(config=config)
|
405
|
-
memory = memory_client(config=config)
|
406
411
|
|
407
|
-
#
|
408
|
-
|
409
|
-
|
410
|
-
|
412
|
+
# Extract chat history from messages
|
413
|
+
chat_history = [
|
414
|
+
{"role": "user", "content": "Hello"},
|
415
|
+
{"role": "assistant", "content": "Hi there!"}
|
416
|
+
]
|
417
|
+
history_str = extract_chat_history(chat_history)
|
418
|
+
|
419
|
+
# Use in prompt
|
420
|
+
response = llm.invoke(f"Given this history:\n{history_str}\n\nUser: How are you?")
|
411
421
|
```
|
412
422
|
|
413
|
-
### Document Processing with
|
423
|
+
### Document Processing with Chunker
|
414
424
|
|
415
425
|
```python
|
416
|
-
from sunholo.
|
417
|
-
from sunholo.
|
426
|
+
from sunholo.chunker import direct_file_to_embed
|
427
|
+
from sunholo.utils import ConfigManager
|
418
428
|
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
429
|
+
config = ConfigManager('my-agent')
|
430
|
+
|
431
|
+
# Process a file directly
|
432
|
+
result = direct_file_to_embed(
|
433
|
+
"document.pdf",
|
434
|
+
embed_prefix="doc",
|
435
|
+
metadata={"source": "user_upload"},
|
436
|
+
vectorstore=config.vacConfig("vectorstore")
|
423
437
|
)
|
438
|
+
```
|
424
439
|
|
425
|
-
|
426
|
-
chunks = chunk_doc.chunk_file("document.pdf", chunk_size=1000)
|
427
|
-
client.import_documents(chunks)
|
440
|
+
### Vertex AI with Memory Tools
|
428
441
|
|
429
|
-
|
430
|
-
|
442
|
+
```python
|
443
|
+
from sunholo.vertex import get_vertex_memories
|
444
|
+
from sunholo.utils import ConfigManager
|
445
|
+
|
446
|
+
config = ConfigManager('my-agent')
|
447
|
+
|
448
|
+
# Get Vertex AI memory configuration
|
449
|
+
memory_config = get_vertex_memories(config)
|
450
|
+
|
451
|
+
# Use with Vertex AI
|
452
|
+
if memory_config:
|
453
|
+
print(f"Memory tools configured: {memory_config}")
|
431
454
|
```
|
432
455
|
|
433
|
-
### Streaming Flask
|
456
|
+
### Streaming Response with Flask
|
434
457
|
|
435
458
|
```python
|
436
|
-
from sunholo.agents import
|
459
|
+
from sunholo.agents import send_to_qa
|
460
|
+
from flask import Response, request
|
437
461
|
|
438
462
|
@app.route('/vac/streaming/<vac_name>', methods=['POST'])
|
439
463
|
def streaming_endpoint(vac_name):
|
440
464
|
question = request.json.get('user_input')
|
441
465
|
|
442
466
|
def generate():
|
443
|
-
|
467
|
+
# Stream responses from the QA system
|
468
|
+
response = send_to_qa(
|
444
469
|
question,
|
445
470
|
vac_name=vac_name,
|
446
471
|
stream=True
|
447
|
-
)
|
448
|
-
|
472
|
+
)
|
473
|
+
if hasattr(response, '__iter__'):
|
474
|
+
for chunk in response:
|
475
|
+
yield f"data: {chunk}\n\n"
|
476
|
+
else:
|
477
|
+
yield f"data: {response}\n\n"
|
449
478
|
|
450
479
|
return Response(generate(), content_type='text/event-stream')
|
451
480
|
```
|
452
481
|
|
453
|
-
###
|
482
|
+
### Discovery Engine Integration
|
454
483
|
|
455
|
-
```
|
456
|
-
|
457
|
-
sunholo init my-api --template agent
|
458
|
-
|
459
|
-
# Customize configuration
|
460
|
-
cd my-api
|
461
|
-
vi config/vac_config.yaml
|
484
|
+
```python
|
485
|
+
from sunholo.discovery_engine import DiscoveryEngineClient
|
462
486
|
|
463
|
-
#
|
464
|
-
|
487
|
+
# Initialize client
|
488
|
+
client = DiscoveryEngineClient(
|
489
|
+
project_id='my-project',
|
490
|
+
data_store_id='my-datastore'
|
491
|
+
)
|
465
492
|
|
466
|
-
#
|
467
|
-
|
493
|
+
# Search documents
|
494
|
+
results = client.search("What is Vertex AI?")
|
495
|
+
for result in results:
|
496
|
+
print(f"Content: {result.chunk.content}")
|
497
|
+
print(f"Score: {result.relevance_score}")
|
468
498
|
```
|
469
499
|
|
470
500
|
## 🧪 Testing
|