iatoolkit 2.42.0__tar.gz → 2.42.2__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.
- {iatoolkit-2.42.0/src/iatoolkit.egg-info → iatoolkit-2.42.2}/PKG-INFO +1 -1
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/__init__.py +1 -1
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/model_registry.py +22 -5
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/llm_providers/openai_compatible_chat_adapter.py +15 -1
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/llm_proxy.py +22 -2
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/locales/en.yaml +25 -2
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/locales/es.yaml +25 -2
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/llm_query_repo.py +6 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/prompt_service.py +31 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/query_service.py +0 -1
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/tenant_wiki_service.py +214 -42
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/tool_service.py +46 -5
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/prompt_api_view.py +23 -3
- {iatoolkit-2.42.0 → iatoolkit-2.42.2/src/iatoolkit.egg-info}/PKG-INFO +1 -1
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/LICENSE +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/LICENSE_COMMUNITY.md +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/pyproject.toml +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/readme.md +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/requirements.txt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/setup.cfg +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/base_company.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/cli_commands.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/bridge_validation.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/exceptions.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/interfaces/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/interfaces/asset_storage.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/interfaces/database_provider.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/interfaces/memory_compilation_trigger.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/interfaces/memory_lint_trigger.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/interfaces/secret_provider.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/interfaces/signup_policy_resolver.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/interfaces/web_search_provider.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/routes.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/secret_resolver.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/session_manager.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/common/util.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/company_registry.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/llm_capabilities.yaml +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/channel_business_identity.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/channel_conversation_continuity.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/channel_response_style.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/chat_state_rules.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/chat_user_profile.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/core_identity.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/email_output.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/file_download_output.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/format_styles.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/html_structures.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/links_documents.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/memory_usage.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/multimodal_basics.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/output_basics.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/presentation_formatting.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/query_main.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/sql_aggregation_scope.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/sql_casting.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/sql_core.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/sql_jsonb.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/sql_mysql_casting.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/sql_mysql_json.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/sql_redshift_basics.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/sql_redshift_types.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/sql_rules.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts/tool_html_passthrough.prompt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_prompts_pack.yaml +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/config/system_tools_pack.yaml +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/core.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/brevo_mail_app.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/call_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/connectors/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/connectors/file_connector.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/connectors/file_connector_factory.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/connectors/google_cloud_storage_connector.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/connectors/google_drive_connector.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/connectors/local_file_connector.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/connectors/s3_connector.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/google_auth_client.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/google_chat_app.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/inference_embeddings_client.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/inference_handler.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/jina_embeddings_client.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/llm_gateway_resolver.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/llm_providers/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/llm_providers/anthropic_adapter.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/llm_providers/deepseek_adapter.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/llm_providers/gemini_adapter.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/llm_providers/openai_adapter.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/llm_providers/openrouter_adapter.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/llm_response.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/infra/redis_session_manager.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/api_key_repo.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/bridge_repo.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/database_manager.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/document_repo.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/env_secret_provider.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/filesystem_asset_repository.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/knowledge_wiki_repo.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/mcp_token_repo.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/memory_repo.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/models.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/profile_repo.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/prompt_resource_repo.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/sql_dataset_repo.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/sql_source_repo.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/repositories/vs_repo.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/runtime_logging.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/api_key_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/attachment_policy_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/auth_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/benchmark_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/branding_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/company_context_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/configuration_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/context_builder_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/dispatcher_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/embedding_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/excel_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/file_processor_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/history_manager_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/http_tool_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/i18n_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/inference_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/jwt_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/knowledge_base_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/language_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/license_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/llm_client_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/mail_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/markdown_wiki_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/mcp_token_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/memory_compiler_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/memory_lint_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/memory_lookup_policy_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/memory_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/memory_wiki_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/noop_memory_compilation_trigger.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/noop_memory_lint_trigger.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/parsers/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/parsers/contracts.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/parsers/image_normalizer.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/parsers/parsing_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/parsers/pdf_ocr_detection.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/parsers/provider_factory.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/parsers/provider_resolver.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/parsers/providers/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/parsers/providers/basic_provider.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/parsers/providers/docling_provider.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/parsers/validator.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/pdf_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/profile_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/prompt_resource_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/signup_policy_resolver.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/sql_dataset_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/sql_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/sql_source_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/storage_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/structured_output_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/system_prompt_catalog.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/system_tools.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/telemetry_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/tool_output_contract.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/user_feedback_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/user_session_context_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/visual_kb_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/visual_tool_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/warmup_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/web_search/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/web_search/provider_factory.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/web_search/providers/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/web_search/providers/brave_provider.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/services/web_search_service.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/images/fernando.jpeg +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/images/iatoolkit_core.png +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/images/iatoolkit_logo.png +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/js/chat_feedback_button.js +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/js/chat_filepond.js +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/js/chat_help_content.js +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/js/chat_history_button.js +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/js/chat_logout_button.js +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/js/chat_main.js +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/js/chat_memory_button.js +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/js/chat_model_selector.js +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/js/chat_onboarding_button.js +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/js/chat_prompt_manager.js +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/js/chat_reload_button.js +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/styles/chat_iatoolkit.css +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/styles/chat_modal.css +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/styles/chat_public.css +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/styles/documents.css +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/styles/landing_page.css +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/styles/llm_output.css +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/static/styles/onboarding.css +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/_company_header.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/_login_widget.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/account.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/base.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/change_password.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/chat.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/chat_memory_modal.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/chat_modals.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/error.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/forgot_password.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/home_hosted_default.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/memory/wiki_schema.md +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/onboarding_shell.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/pdf/base.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/pdf/letter.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/pdf/report.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/pdf/simple.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/templates/signup.html +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/__init__.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/account_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/api_key_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/base_login_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/categories_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/change_password_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/chat_context_preview_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/chat_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/configuration_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/connectors_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/embedding_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/forgot_password_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/help_content_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/history_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/home_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/init_context_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/llmquery_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/load_document_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/login_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/logout_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/memory_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/profile_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/prompt_context_preview_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/prompt_resource_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/rag_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/root_redirect_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/signup_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/static_page_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/tool_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/user_feedback_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/users_api_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit/views/verify_user_view.py +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit.egg-info/SOURCES.txt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit.egg-info/dependency_links.txt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit.egg-info/requires.txt +0 -0
- {iatoolkit-2.42.0 → iatoolkit-2.42.2}/src/iatoolkit.egg-info/top_level.txt +0 -0
|
@@ -60,6 +60,10 @@ class RouteParam:
|
|
|
60
60
|
is_env_name: bool = False
|
|
61
61
|
#: A regular expression the value must match, or None for "any non-empty".
|
|
62
62
|
pattern: str | None = None
|
|
63
|
+
#: How to finish "'base_url' does not look like ___" when the pattern refuses a
|
|
64
|
+
#: value. Declared here so a new parameter cannot inherit another one's wording:
|
|
65
|
+
#: the message for `model_name` read "does not look like a URL".
|
|
66
|
+
looks_like: str = "a valid value"
|
|
63
67
|
|
|
64
68
|
|
|
65
69
|
#: What each provider needs in order to be reached, keyed by provider.
|
|
@@ -81,14 +85,23 @@ class RouteParam:
|
|
|
81
85
|
#: `openrouter` allows both and requires neither: there is one OpenRouter for
|
|
82
86
|
#: everyone and its base URL has a working default, so an entry only overrides
|
|
83
87
|
#: when it has a reason to.
|
|
88
|
+
#: `model_name` is optional and exists because a catalogue key is lowercased: it
|
|
89
|
+
#: identifies the model across entitlements, rate cards and usage rows, so it cannot
|
|
90
|
+
#: also be the name on the wire. A vLLM endpoint serving
|
|
91
|
+
#: `meta-llama/Llama-3.1-8B-Instruct` answers 404 to the lowercased key. When set,
|
|
92
|
+
#: it is the exact name that endpoint answers to, and only the wire value changes.
|
|
84
93
|
PROVIDER_ROUTE_PARAMS: dict[str, tuple[RouteParam, ...]] = {
|
|
85
94
|
"openai_compatible": (
|
|
86
|
-
RouteParam("base_url", required=True, pattern=r"^https?://\S+$"),
|
|
87
|
-
RouteParam("api_key_env", required=True, is_env_name=True, pattern=r"^[A-Z][A-Z0-9_]*$"
|
|
95
|
+
RouteParam("base_url", required=True, pattern=r"^https?://\S+$", looks_like="a URL"),
|
|
96
|
+
RouteParam("api_key_env", required=True, is_env_name=True, pattern=r"^[A-Z][A-Z0-9_]*$",
|
|
97
|
+
looks_like="an environment variable name"),
|
|
98
|
+
RouteParam("model_name", required=False, pattern=r"^[A-Za-z0-9._:\-/]+$",
|
|
99
|
+
looks_like="a model name"),
|
|
88
100
|
),
|
|
89
101
|
"openrouter": (
|
|
90
|
-
RouteParam("base_url", required=False, pattern=r"^https?://\S+$"),
|
|
91
|
-
RouteParam("api_key_env", required=False, is_env_name=True, pattern=r"^[A-Z][A-Z0-9_]*$"
|
|
102
|
+
RouteParam("base_url", required=False, pattern=r"^https?://\S+$", looks_like="a URL"),
|
|
103
|
+
RouteParam("api_key_env", required=False, is_env_name=True, pattern=r"^[A-Z][A-Z0-9_]*$",
|
|
104
|
+
looks_like="an environment variable name"),
|
|
92
105
|
),
|
|
93
106
|
}
|
|
94
107
|
|
|
@@ -163,12 +176,16 @@ class ModelRegistry:
|
|
|
163
176
|
|
|
164
177
|
def get_capabilities(self, model: str, provider: str | None = None) -> dict:
|
|
165
178
|
normalized_provider = self.normalize_provider(provider=provider, model=model)
|
|
179
|
+
# `openai_compatible` is absent on purpose. Its adapter targets any server
|
|
180
|
+
# that speaks chat.completions — llama.cpp, vLLM, a private gateway — and
|
|
181
|
+
# forwards no reasoning field, because one the server does not know earns a
|
|
182
|
+
# 400. Claiming the capability here made the tenant's Models page offer a
|
|
183
|
+
# reasoning control whose value went nowhere.
|
|
166
184
|
supports_reasoning_effort = normalized_provider in {
|
|
167
185
|
"openai",
|
|
168
186
|
"xai",
|
|
169
187
|
"openrouter",
|
|
170
188
|
"deepseek",
|
|
171
|
-
"openai_compatible",
|
|
172
189
|
}
|
|
173
190
|
supports_text_verbosity = normalized_provider in {"openai", "xai", "openrouter"}
|
|
174
191
|
supports_store = normalized_provider in {"openai", "xai"}
|
|
@@ -22,7 +22,21 @@ class OpenAICompatibleChatAdapter:
|
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
24
|
supports_multimodal = False
|
|
25
|
-
|
|
25
|
+
#: `reasoning` is a **Responses API** parameter. This class calls
|
|
26
|
+
#: `chat.completions.create`, whose signature has no such argument, so the
|
|
27
|
+
#: OpenAI SDK raises a TypeError before any request leaves the process:
|
|
28
|
+
#: "Completions.create() got an unexpected keyword argument 'reasoning'".
|
|
29
|
+
#:
|
|
30
|
+
#: It was True here, and both subclasses overrode it to False — DeepSeek and
|
|
31
|
+
#: OpenRouter each had to correct the base. Nothing was served by this class
|
|
32
|
+
#: directly until a model with provider `openai_compatible` was added from the
|
|
33
|
+
#: catalogue, and that first request crashed.
|
|
34
|
+
supports_reasoning = False
|
|
35
|
+
#: The Chat Completions equivalent is the plain string `reasoning_effort`, and
|
|
36
|
+
#: it stays off *here*: this class targets any OpenAI-compatible server —
|
|
37
|
+
#: llama.cpp, vLLM, a private gateway — and a server that does not know the
|
|
38
|
+
#: field answers 400. A provider whose API does accept it opts in, which is
|
|
39
|
+
#: what DeepseekAdapter does.
|
|
26
40
|
supports_reasoning_effort = False
|
|
27
41
|
supports_reasoning_content_messages = False
|
|
28
42
|
supports_metadata = False
|
|
@@ -142,7 +142,11 @@ class LLMProxy:
|
|
|
142
142
|
request_kwargs["telemetry_execution"] = telemetry_execution
|
|
143
143
|
|
|
144
144
|
# Delegate to the adapter (OpenAI, Gemini, DeepSeek, xAI, Anthropic, etc.)
|
|
145
|
-
return adapter.create_response(
|
|
145
|
+
return adapter.create_response(
|
|
146
|
+
model=self._wire_model(model, model_config),
|
|
147
|
+
input=input,
|
|
148
|
+
**request_kwargs,
|
|
149
|
+
)
|
|
146
150
|
|
|
147
151
|
def describe_transport(self, company_short_name: str, model: str) -> str:
|
|
148
152
|
provider = self._resolve_provider_for_company_model(
|
|
@@ -349,7 +353,6 @@ class LLMProxy:
|
|
|
349
353
|
self.PROVIDER_OPENAI,
|
|
350
354
|
self.PROVIDER_XAI,
|
|
351
355
|
self.PROVIDER_DEEPSEEK,
|
|
352
|
-
self.PROVIDER_OPENAI_COMPATIBLE,
|
|
353
356
|
self.PROVIDER_OPENROUTER,
|
|
354
357
|
})
|
|
355
358
|
)
|
|
@@ -746,6 +749,23 @@ class LLMProxy:
|
|
|
746
749
|
route = (model_config or {}).get("route_config") if isinstance(model_config, dict) else None
|
|
747
750
|
return dict(route) if isinstance(route, dict) else {}
|
|
748
751
|
|
|
752
|
+
@staticmethod
|
|
753
|
+
def _wire_model(model: str, model_config: Dict[str, Any] | None) -> str:
|
|
754
|
+
"""The name the endpoint itself answers to, which is not always our key.
|
|
755
|
+
|
|
756
|
+
Catalogue keys are lowercased on write, because one key identifies a model
|
|
757
|
+
across entitlements, rate cards and usage rows. A server is free to be
|
|
758
|
+
case-sensitive: a vLLM endpoint serving `meta-llama/Llama-3.1-8B-Instruct`
|
|
759
|
+
answers `404 - The model does not exist` to the lowercased key.
|
|
760
|
+
|
|
761
|
+
So an entry may carry the exact served name in its route, and only the value
|
|
762
|
+
on the wire changes. Everything metered stays keyed by the catalogue key,
|
|
763
|
+
which is what keeps one model from splitting into two usage lines.
|
|
764
|
+
"""
|
|
765
|
+
route = LLMProxy._model_route(model_config)
|
|
766
|
+
served_name = str(route.get("model_name") or "").strip()
|
|
767
|
+
return served_name or model
|
|
768
|
+
|
|
749
769
|
@staticmethod
|
|
750
770
|
def _model_credential_ref(model_config: Dict[str, Any] | None) -> str | None:
|
|
751
771
|
"""The secret this model is entitled to run on, when the company owns it.
|
|
@@ -1806,6 +1806,17 @@ ui:
|
|
|
1806
1806
|
new_modal_title: "Create New Prompt"
|
|
1807
1807
|
name_label: "Name (Slug)"
|
|
1808
1808
|
name_help: "Use lowercase, numbers, and underscores only."
|
|
1809
|
+
create_name_label: "Name"
|
|
1810
|
+
create_name_placeholder: "Customer Support"
|
|
1811
|
+
create_name_help: "Used to suggest the technical identifier."
|
|
1812
|
+
create_key_label: "Technical ID"
|
|
1813
|
+
create_key_placeholder: "customer_support"
|
|
1814
|
+
create_key_help: "Stable snake_case identifier used internally."
|
|
1815
|
+
create_name_required: "Name is required."
|
|
1816
|
+
create_key_required: "Technical ID is required."
|
|
1817
|
+
create_creating: "Creating agent..."
|
|
1818
|
+
create_success: "Agent \"{name}\" created."
|
|
1819
|
+
create_failed: "Failed to create the agent."
|
|
1809
1820
|
category_label: "Category"
|
|
1810
1821
|
versions_btn: "Versions"
|
|
1811
1822
|
versions_modal_title: "Previous versions"
|
|
@@ -1848,8 +1859,9 @@ ui:
|
|
|
1848
1859
|
type_label: "Tool Type"
|
|
1849
1860
|
method_label: "Execution Method"
|
|
1850
1861
|
method_help: "Python method name in your company class implementation, or inference tool name."
|
|
1851
|
-
desc_label: "Description
|
|
1852
|
-
desc_placeholder: "Describe
|
|
1862
|
+
desc_label: "Description for the agent"
|
|
1863
|
+
desc_placeholder: "Describe for the agent when and how to use this tool..."
|
|
1864
|
+
desc_help: "This description guides the agent in deciding when to use this tool."
|
|
1853
1865
|
active_label: "Active"
|
|
1854
1866
|
|
|
1855
1867
|
# Schema Section
|
|
@@ -1877,6 +1889,14 @@ ui:
|
|
|
1877
1889
|
modal_title: "Create New Tool"
|
|
1878
1890
|
modal_name_label: "Tool Name (LLM Function)"
|
|
1879
1891
|
modal_name_help: "Use snake_case. Must be unique."
|
|
1892
|
+
modal_display_name_label: "Name"
|
|
1893
|
+
modal_display_name_placeholder: "Tax Calculator"
|
|
1894
|
+
modal_display_name_help: "Used to suggest the technical identifier."
|
|
1895
|
+
modal_display_name_required: "Name is required."
|
|
1896
|
+
modal_key_label: "Technical ID"
|
|
1897
|
+
modal_key_placeholder: "calculate_tax"
|
|
1898
|
+
modal_key_help: "Stable snake_case identifier used by prompts and routing."
|
|
1899
|
+
modal_key_required: "Technical ID is required."
|
|
1880
1900
|
modal_type_label: "Type"
|
|
1881
1901
|
modal_output_preset_label: "Output preset"
|
|
1882
1902
|
modal_output_preset_none: "No preset"
|
|
@@ -2172,6 +2192,7 @@ ui:
|
|
|
2172
2192
|
col_cost: "Cost"
|
|
2173
2193
|
col_key: "API key"
|
|
2174
2194
|
col_enabled: "Enabled"
|
|
2195
|
+
col_default: "Default"
|
|
2175
2196
|
col_reasoning: "Reasoning"
|
|
2176
2197
|
cost_metered: "Metered"
|
|
2177
2198
|
cost_not_billable: "No charge"
|
|
@@ -2206,6 +2227,8 @@ ui:
|
|
|
2206
2227
|
form_route_base_url_hint: "The full URL requests go to, e.g. https://your-host/v1"
|
|
2207
2228
|
form_route_api_key_env: "Credential variable"
|
|
2208
2229
|
form_route_api_key_env_hint: "The NAME of an environment variable in this deployment, e.g. OSS_LLM_API_KEY. Never the key itself."
|
|
2230
|
+
form_route_model_name: "Name served by the endpoint"
|
|
2231
|
+
form_route_model_name_hint: "Optional. The exact name this endpoint answers to, e.g. meta-llama/Llama-3.1-8B-Instruct. Leave empty to send the identifier above, which is stored in lowercase."
|
|
2209
2232
|
route_required: "This provider needs an endpoint and the name of its credential variable."
|
|
2210
2233
|
secrets:
|
|
2211
2234
|
title: "Secrets"
|
|
@@ -1811,6 +1811,17 @@ ui:
|
|
|
1811
1811
|
new_modal_title: "Crear Nuevo Prompt"
|
|
1812
1812
|
name_label: "Nombre (Slug)"
|
|
1813
1813
|
name_help: "Solo minúsculas, números y guiones bajos."
|
|
1814
|
+
create_name_label: "Nombre"
|
|
1815
|
+
create_name_placeholder: "Soporte al cliente"
|
|
1816
|
+
create_name_help: "Se usa para sugerir el identificador técnico."
|
|
1817
|
+
create_key_label: "ID técnico"
|
|
1818
|
+
create_key_placeholder: "soporte_cliente"
|
|
1819
|
+
create_key_help: "Identificador estable en snake_case usado internamente."
|
|
1820
|
+
create_name_required: "El nombre es obligatorio."
|
|
1821
|
+
create_key_required: "El ID técnico es obligatorio."
|
|
1822
|
+
create_creating: "Creando agente..."
|
|
1823
|
+
create_success: "Agente \"{name}\" creado."
|
|
1824
|
+
create_failed: "No se pudo crear el agente."
|
|
1814
1825
|
category_label: "Categoría"
|
|
1815
1826
|
versions_btn: "Versiones"
|
|
1816
1827
|
versions_modal_title: "Versiones antiguas"
|
|
@@ -1854,8 +1865,9 @@ ui:
|
|
|
1854
1865
|
type_label: "Tipo de Herramienta"
|
|
1855
1866
|
method_label: "Método a ejecutar"
|
|
1856
1867
|
method_help: "Nombre del método Python en la implementación de la clase de su empresa, o nombre de tool en inference"
|
|
1857
|
-
desc_label: "Descripción
|
|
1858
|
-
desc_placeholder: "Describe al
|
|
1868
|
+
desc_label: "Descripción para el agente"
|
|
1869
|
+
desc_placeholder: "Describe al agente cuándo y cómo usar esta tool..."
|
|
1870
|
+
desc_help: "Esta descripción guía al agente para decidir cuándo usar esta tool."
|
|
1859
1871
|
active_label: "Activo"
|
|
1860
1872
|
|
|
1861
1873
|
# Schema Section
|
|
@@ -1883,6 +1895,14 @@ ui:
|
|
|
1883
1895
|
modal_title: "Crear Nueva Herramienta"
|
|
1884
1896
|
modal_name_label: "Nombre (Función LLM)"
|
|
1885
1897
|
modal_name_help: "Usar snake_case. Debe ser único."
|
|
1898
|
+
modal_display_name_label: "Nombre"
|
|
1899
|
+
modal_display_name_placeholder: "Calculadora tributaria"
|
|
1900
|
+
modal_display_name_help: "Se usa para sugerir el identificador técnico."
|
|
1901
|
+
modal_display_name_required: "El nombre es obligatorio."
|
|
1902
|
+
modal_key_label: "ID técnico"
|
|
1903
|
+
modal_key_placeholder: "calcular_impuestos"
|
|
1904
|
+
modal_key_help: "Identificador estable en snake_case usado por prompts y routing."
|
|
1905
|
+
modal_key_required: "El ID técnico es obligatorio."
|
|
1886
1906
|
modal_type_label: "Tipo"
|
|
1887
1907
|
modal_output_preset_label: "Preset de output"
|
|
1888
1908
|
modal_output_preset_none: "Sin preset"
|
|
@@ -2178,6 +2198,7 @@ ui:
|
|
|
2178
2198
|
col_cost: "Costo"
|
|
2179
2199
|
col_key: "API key"
|
|
2180
2200
|
col_enabled: "Habilitado"
|
|
2201
|
+
col_default: "Por defecto"
|
|
2181
2202
|
col_reasoning: "Razonamiento"
|
|
2182
2203
|
cost_metered: "Con medición"
|
|
2183
2204
|
cost_not_billable: "Sin costo"
|
|
@@ -2212,6 +2233,8 @@ ui:
|
|
|
2212
2233
|
form_route_base_url_hint: "La URL completa a la que van las requests, ej. https://tu-host/v1"
|
|
2213
2234
|
form_route_api_key_env: "Variable de la credencial"
|
|
2214
2235
|
form_route_api_key_env_hint: "El NOMBRE de una variable de entorno de este deployment, ej. OSS_LLM_API_KEY. Nunca la key."
|
|
2236
|
+
form_route_model_name: "Nombre que sirve el endpoint"
|
|
2237
|
+
form_route_model_name_hint: "Opcional. El nombre exacto al que responde el endpoint, ej. meta-llama/Llama-3.1-8B-Instruct. Vacío envía el identificador de arriba, que se guarda en minúsculas."
|
|
2215
2238
|
route_required: "Este proveedor necesita un endpoint y el nombre de la variable con su credencial."
|
|
2216
2239
|
secrets:
|
|
2217
2240
|
title: "Secrets"
|
|
@@ -66,6 +66,12 @@ class LLMQueryRepo:
|
|
|
66
66
|
is_active=True
|
|
67
67
|
).first()
|
|
68
68
|
|
|
69
|
+
def get_tool_by_name(self, company: Company, tool_name: str) -> Tool | None:
|
|
70
|
+
return self.session.query(Tool).filter_by(
|
|
71
|
+
company_id=company.id,
|
|
72
|
+
name=tool_name,
|
|
73
|
+
).first()
|
|
74
|
+
|
|
69
75
|
def get_system_tool(self, tool_name: str) -> Tool | None:
|
|
70
76
|
return self.session.query(Tool).filter_by(
|
|
71
77
|
tool_type=Tool.TYPE_SYSTEM,
|
|
@@ -22,8 +22,11 @@ from iatoolkit.common.exceptions import IAToolkitException
|
|
|
22
22
|
from iatoolkit.services.system_prompt_catalog import build_system_prompt_payload
|
|
23
23
|
from iatoolkit.services.structured_output_service import StructuredOutputService
|
|
24
24
|
import logging
|
|
25
|
+
import re
|
|
26
|
+
import unicodedata
|
|
25
27
|
|
|
26
28
|
class PromptService:
|
|
29
|
+
PROMPT_NAME_MAX_LENGTH = 255
|
|
27
30
|
OUTPUT_SCHEMA_MODE_BEST_EFFORT = "best_effort"
|
|
28
31
|
OUTPUT_SCHEMA_MODE_STRICT = "strict"
|
|
29
32
|
OUTPUT_RESPONSE_MODE_CHAT = "chat_compatible"
|
|
@@ -76,6 +79,34 @@ class PromptService:
|
|
|
76
79
|
self.sql_service = sql_service
|
|
77
80
|
self.configuration_service = configuration_service
|
|
78
81
|
|
|
82
|
+
@classmethod
|
|
83
|
+
def normalize_prompt_name(cls, prompt_name: str | None) -> str:
|
|
84
|
+
candidate = str(prompt_name or "").strip()
|
|
85
|
+
if not candidate:
|
|
86
|
+
raise IAToolkitException(
|
|
87
|
+
IAToolkitException.ErrorType.MISSING_PARAMETER,
|
|
88
|
+
"Prompt name is required",
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
normalized = unicodedata.normalize("NFKD", candidate).encode("ascii", "ignore").decode("ascii")
|
|
92
|
+
normalized = normalized.lower()
|
|
93
|
+
normalized = re.sub(r"[^a-z0-9]+", "_", normalized)
|
|
94
|
+
normalized = re.sub(r"_+", "_", normalized).strip("_")
|
|
95
|
+
|
|
96
|
+
if not normalized:
|
|
97
|
+
raise IAToolkitException(
|
|
98
|
+
IAToolkitException.ErrorType.INVALID_PARAMETER,
|
|
99
|
+
"Prompt name must contain letters or numbers",
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
if len(normalized) > cls.PROMPT_NAME_MAX_LENGTH:
|
|
103
|
+
raise IAToolkitException(
|
|
104
|
+
IAToolkitException.ErrorType.INVALID_PARAMETER,
|
|
105
|
+
f"Prompt name must be {cls.PROMPT_NAME_MAX_LENGTH} characters or fewer",
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
return normalized
|
|
109
|
+
|
|
79
110
|
def _normalize_execution_mode(
|
|
80
111
|
self,
|
|
81
112
|
execution_mode: str | None,
|
|
@@ -56,6 +56,10 @@ class TenantWikiService:
|
|
|
56
56
|
ACCESS_MODE_ENFORCE = "enforce"
|
|
57
57
|
ACCESS_MODES = (ACCESS_MODE_OFF, ACCESS_MODE_DRY_RUN, ACCESS_MODE_ENFORCE)
|
|
58
58
|
|
|
59
|
+
# What a withheld page answers with, instead of "not found".
|
|
60
|
+
ACCESS_STATUS_FORBIDDEN = "forbidden"
|
|
61
|
+
ACCESS_STATUS_UNAVAILABLE = "unavailable"
|
|
62
|
+
|
|
59
63
|
# Resolves the visibility labels one user holds. Registered by the edition
|
|
60
64
|
# that knows where they come from -- the core has no business calling a
|
|
61
65
|
# tenant's access control service -- and left unset in the community edition,
|
|
@@ -138,6 +142,42 @@ class TenantWikiService:
|
|
|
138
142
|
def clear_access_label_resolver(cls) -> None:
|
|
139
143
|
cls._access_label_resolver = None
|
|
140
144
|
|
|
145
|
+
@classmethod
|
|
146
|
+
def denial_event_metadata(cls, payload: Any) -> dict | None:
|
|
147
|
+
"""
|
|
148
|
+
Turns a withheld-page answer into what is worth recording about it, or
|
|
149
|
+
None when the payload is not one.
|
|
150
|
+
|
|
151
|
+
Lives next to the payload it reads, so whoever changes the shape of a
|
|
152
|
+
denial changes this in the same edit. Callers decide how to store it: the
|
|
153
|
+
point of recording denials is to find pages classified more strictly than
|
|
154
|
+
they should be, without waiting for someone to complain.
|
|
155
|
+
"""
|
|
156
|
+
if not isinstance(payload, dict):
|
|
157
|
+
return None
|
|
158
|
+
status = str(payload.get("status") or "").strip().lower()
|
|
159
|
+
if status not in {cls.ACCESS_STATUS_FORBIDDEN, cls.ACCESS_STATUS_UNAVAILABLE}:
|
|
160
|
+
return None
|
|
161
|
+
if not payload.get("path") or "blocked_by" not in payload:
|
|
162
|
+
# Some other subsystem's 'forbidden', not a wiki page decision.
|
|
163
|
+
return None
|
|
164
|
+
|
|
165
|
+
return {
|
|
166
|
+
"reason": str(payload.get("reason") or "").strip() or None,
|
|
167
|
+
"metadata": {
|
|
168
|
+
"access_denial": {
|
|
169
|
+
"status": status,
|
|
170
|
+
"blocked_by": payload.get("blocked_by"),
|
|
171
|
+
"wiki_key": payload.get("wiki_key"),
|
|
172
|
+
"path": payload.get("path"),
|
|
173
|
+
"required_labels": list(payload.get("required_labels") or []),
|
|
174
|
+
"held_labels": list(payload.get("held_labels") or []),
|
|
175
|
+
"not_registered": bool(payload.get("not_registered")),
|
|
176
|
+
"unlabelled_page": bool(payload.get("unlabelled_page")),
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
}
|
|
180
|
+
|
|
141
181
|
@classmethod
|
|
142
182
|
def page_is_visible(cls, access_tags: Any, user_labels: Any) -> bool:
|
|
143
183
|
"""
|
|
@@ -548,6 +588,15 @@ class TenantWikiService:
|
|
|
548
588
|
if page is None or page.status == KnowledgeWikiPageStatus.ARCHIVED:
|
|
549
589
|
return {"status": "error", "error_message": "page not found"}
|
|
550
590
|
if visibility_filter is not None and not visibility_filter(page.path):
|
|
591
|
+
# A page that exists but is withheld says so, naming the label it
|
|
592
|
+
# needs. Answering "not found" would protect the content and bury the
|
|
593
|
+
# mistake: an over-restricted page is never reported by anyone,
|
|
594
|
+
# because nobody can tell there is anything to report.
|
|
595
|
+
if isinstance(visibility_filter, AccessGate):
|
|
596
|
+
return {
|
|
597
|
+
**visibility_filter.denial_payload(page.path),
|
|
598
|
+
"wiki": self.serialize_wiki(wiki),
|
|
599
|
+
}
|
|
551
600
|
return {"status": "error", "error_message": "page not found"}
|
|
552
601
|
|
|
553
602
|
markdown = self.markdown_wiki_service.read_markdown(company_short_name, page.source_storage_key)
|
|
@@ -945,54 +994,24 @@ class TenantWikiService:
|
|
|
945
994
|
wiki that never opted in behaves exactly as it did before. In dry_run the
|
|
946
995
|
decision is computed and logged but not applied, which is how a corpus of
|
|
947
996
|
this size gets switched on without a blackout. In enforce it is applied.
|
|
997
|
+
|
|
998
|
+
Returns a gate that is callable like any other filter, and that can also
|
|
999
|
+
explain a single denial — see `AccessGate.denial_payload`.
|
|
948
1000
|
"""
|
|
949
1001
|
access_control = self.wiki_access_control(wiki)
|
|
950
1002
|
mode = access_control["mode"]
|
|
951
1003
|
if mode == self.ACCESS_MODE_OFF:
|
|
952
1004
|
return base_filter
|
|
953
1005
|
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
if not index_loaded:
|
|
964
|
-
access_tags_index.update({
|
|
965
|
-
page.path: (page.access_tags or [])
|
|
966
|
-
for page in self.knowledge_wiki_repo.list_pages(
|
|
967
|
-
wiki.id,
|
|
968
|
-
include_archived=False,
|
|
969
|
-
limit=self.MAX_PAGES,
|
|
970
|
-
)
|
|
971
|
-
})
|
|
972
|
-
index_loaded = True
|
|
973
|
-
# A path with no row is unknown, and unknown denies.
|
|
974
|
-
return access_tags_index.get(path)
|
|
975
|
-
|
|
976
|
-
def is_visible(path: str) -> bool:
|
|
977
|
-
nonlocal already_logged
|
|
978
|
-
if base_filter is not None and not base_filter(path):
|
|
979
|
-
return False
|
|
980
|
-
if self.page_is_visible(access_tags_for(path), user_labels):
|
|
981
|
-
return True
|
|
982
|
-
if not already_logged:
|
|
983
|
-
already_logged = True
|
|
984
|
-
logging.info(
|
|
985
|
-
"Knowledge wiki access %s: company=%s wiki=%s user=%s labels=%s first_denied_path=%s",
|
|
986
|
-
"would deny (dry_run)" if mode == self.ACCESS_MODE_DRY_RUN else "denied",
|
|
987
|
-
company_short_name,
|
|
988
|
-
wiki.wiki_key,
|
|
989
|
-
user_identifier or "(none)",
|
|
990
|
-
"unresolved" if user_labels is None else sorted(user_labels),
|
|
991
|
-
path,
|
|
992
|
-
)
|
|
993
|
-
return mode == self.ACCESS_MODE_DRY_RUN
|
|
994
|
-
|
|
995
|
-
return is_visible
|
|
1006
|
+
return AccessGate(
|
|
1007
|
+
service=self,
|
|
1008
|
+
company_short_name=company_short_name,
|
|
1009
|
+
wiki=wiki,
|
|
1010
|
+
user_identifier=user_identifier,
|
|
1011
|
+
base_filter=base_filter,
|
|
1012
|
+
mode=mode,
|
|
1013
|
+
user_labels=self._resolve_access_labels(company_short_name, user_identifier),
|
|
1014
|
+
)
|
|
996
1015
|
|
|
997
1016
|
def _resolve_access_labels(self, company_short_name: str, user_identifier: str | None):
|
|
998
1017
|
if not str(user_identifier or "").strip():
|
|
@@ -2122,3 +2141,156 @@ class TenantWikiService:
|
|
|
2122
2141
|
"started_at": run.started_at.isoformat() if run.started_at else None,
|
|
2123
2142
|
"finished_at": run.finished_at.isoformat() if run.finished_at else None,
|
|
2124
2143
|
}
|
|
2144
|
+
|
|
2145
|
+
|
|
2146
|
+
class AccessGate:
|
|
2147
|
+
"""
|
|
2148
|
+
Decides whether one reader may see a page of one wiki, and says why not.
|
|
2149
|
+
|
|
2150
|
+
It is callable, so it serves as the visibility filter for bulk work (the
|
|
2151
|
+
index, search) where only a yes or no is needed. For a single page,
|
|
2152
|
+
`denial_payload` turns the same decision into an answer the caller can hand
|
|
2153
|
+
to a model: which label the page needs, which ones the reader holds, and
|
|
2154
|
+
whether the reader is registered at all.
|
|
2155
|
+
|
|
2156
|
+
Saying "forbidden" instead of "not found" makes a page's existence visible,
|
|
2157
|
+
which is deliberate. A denial that looks like a 404 protects the content but
|
|
2158
|
+
hides the mistake: a page classified more strictly than it should be is never
|
|
2159
|
+
reported, because nobody can tell there is anything to report.
|
|
2160
|
+
"""
|
|
2161
|
+
|
|
2162
|
+
BLOCKED_BY_LABELS = "labels"
|
|
2163
|
+
BLOCKED_BY_POLICY = "policy"
|
|
2164
|
+
|
|
2165
|
+
def __init__(
|
|
2166
|
+
self,
|
|
2167
|
+
*,
|
|
2168
|
+
service: TenantWikiService,
|
|
2169
|
+
company_short_name: str,
|
|
2170
|
+
wiki: KnowledgeWiki,
|
|
2171
|
+
user_identifier: str | None,
|
|
2172
|
+
base_filter: Callable[[str], bool] | None,
|
|
2173
|
+
mode: str,
|
|
2174
|
+
user_labels: Any,
|
|
2175
|
+
):
|
|
2176
|
+
self.service = service
|
|
2177
|
+
self.company_short_name = company_short_name
|
|
2178
|
+
self.wiki = wiki
|
|
2179
|
+
self.user_identifier = user_identifier
|
|
2180
|
+
self.base_filter = base_filter
|
|
2181
|
+
self.mode = mode
|
|
2182
|
+
self.user_labels = user_labels
|
|
2183
|
+
self._access_tags_index: dict[str, list[str]] | None = None
|
|
2184
|
+
# One log line per call, not per page: a 1.268-page index would bury the
|
|
2185
|
+
# log. The full picture is the `wiki-access-check` report.
|
|
2186
|
+
self._logged = False
|
|
2187
|
+
|
|
2188
|
+
def __call__(self, path: str) -> bool:
|
|
2189
|
+
if self.base_filter is not None and not self.base_filter(path):
|
|
2190
|
+
return False
|
|
2191
|
+
if self.service.page_is_visible(self._access_tags_for(path), self.user_labels):
|
|
2192
|
+
return True
|
|
2193
|
+
self._log_once(path)
|
|
2194
|
+
# dry_run computes the decision and reports it without applying it.
|
|
2195
|
+
return self.mode == TenantWikiService.ACCESS_MODE_DRY_RUN
|
|
2196
|
+
|
|
2197
|
+
def denial_payload(self, path: str) -> dict:
|
|
2198
|
+
"""
|
|
2199
|
+
Why this page was withheld, in a shape a model can act on.
|
|
2200
|
+
|
|
2201
|
+
Never carries the title, the summary or the body: the caller already knew
|
|
2202
|
+
the path it asked for, and nothing else about the page needs to leak for
|
|
2203
|
+
the reader to know what to request.
|
|
2204
|
+
"""
|
|
2205
|
+
payload = {
|
|
2206
|
+
"wiki_key": self.wiki.wiki_key,
|
|
2207
|
+
"path": path,
|
|
2208
|
+
"held_labels": sorted(self._comparable(self.user_labels)) if self.user_labels is not None else [],
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
if self.base_filter is not None and not self.base_filter(path):
|
|
2212
|
+
# A policy rule, not a label. Naming a label here would send the
|
|
2213
|
+
# reader to ask for a grant that would not change the outcome.
|
|
2214
|
+
return {
|
|
2215
|
+
**payload,
|
|
2216
|
+
"status": TenantWikiService.ACCESS_STATUS_FORBIDDEN,
|
|
2217
|
+
"blocked_by": self.BLOCKED_BY_POLICY,
|
|
2218
|
+
"reason": "an access policy blocks this path",
|
|
2219
|
+
"required_labels": [],
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
if self.user_labels is None:
|
|
2223
|
+
# Not "you lack permission": nobody knows yet. Telling the reader to
|
|
2224
|
+
# request a label during an outage of the access control service
|
|
2225
|
+
# sends them to ask for something they may already hold.
|
|
2226
|
+
return {
|
|
2227
|
+
**payload,
|
|
2228
|
+
"status": TenantWikiService.ACCESS_STATUS_UNAVAILABLE,
|
|
2229
|
+
"blocked_by": self.BLOCKED_BY_LABELS,
|
|
2230
|
+
"reason": "your access could not be verified right now; retry shortly",
|
|
2231
|
+
"required_labels": [],
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
required = sorted(self._comparable(self._access_tags_for(path)))
|
|
2235
|
+
if not required:
|
|
2236
|
+
# The page carries no labels at all, so it is unreadable for everyone.
|
|
2237
|
+
# That is a classification defect, not a permission decision, and it
|
|
2238
|
+
# is worth saying so plainly to whoever runs into it.
|
|
2239
|
+
return {
|
|
2240
|
+
**payload,
|
|
2241
|
+
"status": TenantWikiService.ACCESS_STATUS_FORBIDDEN,
|
|
2242
|
+
"blocked_by": self.BLOCKED_BY_LABELS,
|
|
2243
|
+
"reason": "this page carries no access labels, so no one can read it",
|
|
2244
|
+
"required_labels": [],
|
|
2245
|
+
"unlabelled_page": True,
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
if not self.user_labels:
|
|
2249
|
+
return {
|
|
2250
|
+
**payload,
|
|
2251
|
+
"status": TenantWikiService.ACCESS_STATUS_FORBIDDEN,
|
|
2252
|
+
"blocked_by": self.BLOCKED_BY_LABELS,
|
|
2253
|
+
"reason": "you hold no access labels for this knowledge base",
|
|
2254
|
+
"required_labels": required,
|
|
2255
|
+
"not_registered": True,
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
return {
|
|
2259
|
+
**payload,
|
|
2260
|
+
"status": TenantWikiService.ACCESS_STATUS_FORBIDDEN,
|
|
2261
|
+
"blocked_by": self.BLOCKED_BY_LABELS,
|
|
2262
|
+
"reason": "this page requires an access label you do not hold",
|
|
2263
|
+
"required_labels": required,
|
|
2264
|
+
"not_registered": False,
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
def _access_tags_for(self, path: str):
|
|
2268
|
+
if self._access_tags_index is None:
|
|
2269
|
+
self._access_tags_index = {
|
|
2270
|
+
page.path: (page.access_tags or [])
|
|
2271
|
+
for page in self.service.knowledge_wiki_repo.list_pages(
|
|
2272
|
+
self.wiki.id,
|
|
2273
|
+
include_archived=False,
|
|
2274
|
+
limit=TenantWikiService.MAX_PAGES,
|
|
2275
|
+
)
|
|
2276
|
+
}
|
|
2277
|
+
# A path with no row is unknown, and unknown denies.
|
|
2278
|
+
return self._access_tags_index.get(path)
|
|
2279
|
+
|
|
2280
|
+
@staticmethod
|
|
2281
|
+
def _comparable(value: Any) -> set[str]:
|
|
2282
|
+
return TenantWikiService._comparable_labels(value)
|
|
2283
|
+
|
|
2284
|
+
def _log_once(self, path: str) -> None:
|
|
2285
|
+
if self._logged:
|
|
2286
|
+
return
|
|
2287
|
+
self._logged = True
|
|
2288
|
+
logging.info(
|
|
2289
|
+
"Knowledge wiki access %s: company=%s wiki=%s user=%s labels=%s first_denied_path=%s",
|
|
2290
|
+
"would deny (dry_run)" if self.mode == TenantWikiService.ACCESS_MODE_DRY_RUN else "denied",
|
|
2291
|
+
self.company_short_name,
|
|
2292
|
+
self.wiki.wiki_key,
|
|
2293
|
+
self.user_identifier or "(none)",
|
|
2294
|
+
"unresolved" if self.user_labels is None else sorted(self._comparable(self.user_labels)),
|
|
2295
|
+
path,
|
|
2296
|
+
)
|