docsgpt 0.19.0__py3-none-any.whl
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.
- docsgpt/__init__.py +0 -0
- docsgpt/agents/__init__.py +0 -0
- docsgpt/agents/agent_creator.py +25 -0
- docsgpt/agents/agentic_agent.py +58 -0
- docsgpt/agents/base.py +1484 -0
- docsgpt/agents/classic_agent.py +60 -0
- docsgpt/agents/default_tools.py +385 -0
- docsgpt/agents/headless_runner.py +284 -0
- docsgpt/agents/research_agent.py +703 -0
- docsgpt/agents/scheduler_utils.py +131 -0
- docsgpt/agents/tool_executor.py +1471 -0
- docsgpt/agents/tools/api_body_serializer.py +322 -0
- docsgpt/agents/tools/api_tool.py +237 -0
- docsgpt/agents/tools/artifact_generator.py +893 -0
- docsgpt/agents/tools/artifact_ref.py +67 -0
- docsgpt/agents/tools/attachment_bridge.py +152 -0
- docsgpt/agents/tools/base.py +23 -0
- docsgpt/agents/tools/brave.py +198 -0
- docsgpt/agents/tools/code_executor.py +498 -0
- docsgpt/agents/tools/cryptoprice.py +80 -0
- docsgpt/agents/tools/duckduckgo.py +216 -0
- docsgpt/agents/tools/internal_search.py +502 -0
- docsgpt/agents/tools/mcp_tool.py +1106 -0
- docsgpt/agents/tools/memory.py +523 -0
- docsgpt/agents/tools/notes.py +264 -0
- docsgpt/agents/tools/ntfy.py +137 -0
- docsgpt/agents/tools/path_utils.py +34 -0
- docsgpt/agents/tools/postgres.py +180 -0
- docsgpt/agents/tools/read_document.py +479 -0
- docsgpt/agents/tools/read_webpage.py +218 -0
- docsgpt/agents/tools/remote_device.py +317 -0
- docsgpt/agents/tools/scheduler.py +342 -0
- docsgpt/agents/tools/spec_parser.py +342 -0
- docsgpt/agents/tools/telegram.py +102 -0
- docsgpt/agents/tools/think.py +70 -0
- docsgpt/agents/tools/todo_list.py +357 -0
- docsgpt/agents/tools/tool_action_parser.py +158 -0
- docsgpt/agents/tools/tool_manager.py +77 -0
- docsgpt/agents/tools/wiki.py +510 -0
- docsgpt/agents/workflow_agent.py +545 -0
- docsgpt/agents/workflows/cel_evaluator.py +158 -0
- docsgpt/agents/workflows/node_agent.py +81 -0
- docsgpt/agents/workflows/schemas.py +193 -0
- docsgpt/agents/workflows/workflow_engine.py +1401 -0
- docsgpt/alembic/env.py +92 -0
- docsgpt/alembic/script.py.mako +26 -0
- docsgpt/alembic/versions/0001_initial.py +927 -0
- docsgpt/alembic/versions/0002_app_metadata.py +37 -0
- docsgpt/alembic/versions/0003_user_custom_models.py +65 -0
- docsgpt/alembic/versions/0004_durability_foundation.py +217 -0
- docsgpt/alembic/versions/0005_ingest_attempt_id.py +44 -0
- docsgpt/alembic/versions/0006_idempotency_lease.py +57 -0
- docsgpt/alembic/versions/0007_message_events.py +40 -0
- docsgpt/alembic/versions/0008_ingest_progress_status.py +44 -0
- docsgpt/alembic/versions/0009_tool_preferences.py +83 -0
- docsgpt/alembic/versions/0010_schedules.py +147 -0
- docsgpt/alembic/versions/0011_schedules_nullable_agent.py +53 -0
- docsgpt/alembic/versions/0012_remote_devices.py +117 -0
- docsgpt/alembic/versions/0013_devices_approval_modes.py +52 -0
- docsgpt/alembic/versions/0014_device_token_hash_index.py +29 -0
- docsgpt/alembic/versions/0015_token_usage_model_id.py +34 -0
- docsgpt/alembic/versions/0016_conversation_visibility.py +59 -0
- docsgpt/alembic/versions/0017_oidc_scim.py +48 -0
- docsgpt/alembic/versions/0018_tool_attempts_attribution.py +56 -0
- docsgpt/alembic/versions/0019_agent_slug.py +36 -0
- docsgpt/alembic/versions/0020_user_roles.py +50 -0
- docsgpt/alembic/versions/0021_teams.py +181 -0
- docsgpt/alembic/versions/0022_source_config.py +41 -0
- docsgpt/alembic/versions/0023_wiki_pages.py +64 -0
- docsgpt/alembic/versions/0024_wiki_pages_updated_via.py +28 -0
- docsgpt/alembic/versions/0025_artifacts.py +111 -0
- docsgpt/alembic/versions/0026_stack_logs_agent_id.py +52 -0
- docsgpt/alembic/versions/0027_schedule_run_error_types.py +61 -0
- docsgpt/alembic/versions/0028_user_logs_agent_lookup_idx.py +114 -0
- docsgpt/alembic/versions/0029_agent_guardrails.py +104 -0
- docsgpt/alembic/versions/0030_superseded_messages.py +55 -0
- docsgpt/alembic/versions/0031_token_usage_cache_tokens.py +35 -0
- docsgpt/alembic.ini +52 -0
- docsgpt/api/__init__.py +7 -0
- docsgpt/api/admin/__init__.py +3 -0
- docsgpt/api/admin/routes.py +375 -0
- docsgpt/api/answer/__init__.py +21 -0
- docsgpt/api/answer/routes/__init__.py +0 -0
- docsgpt/api/answer/routes/answer.py +192 -0
- docsgpt/api/answer/routes/base.py +1689 -0
- docsgpt/api/answer/routes/search.py +55 -0
- docsgpt/api/answer/routes/stream.py +220 -0
- docsgpt/api/answer/services/__init__.py +0 -0
- docsgpt/api/answer/services/compression/__init__.py +20 -0
- docsgpt/api/answer/services/compression/message_builder.py +249 -0
- docsgpt/api/answer/services/compression/orchestrator.py +353 -0
- docsgpt/api/answer/services/compression/prompt_builder.py +149 -0
- docsgpt/api/answer/services/compression/service.py +483 -0
- docsgpt/api/answer/services/compression/threshold_checker.py +111 -0
- docsgpt/api/answer/services/compression/token_counter.py +174 -0
- docsgpt/api/answer/services/compression/types.py +184 -0
- docsgpt/api/answer/services/continuation_service.py +220 -0
- docsgpt/api/answer/services/conversation_service.py +660 -0
- docsgpt/api/answer/services/persistence_policy.py +44 -0
- docsgpt/api/answer/services/prompt_renderer.py +190 -0
- docsgpt/api/answer/services/stream_processor.py +1840 -0
- docsgpt/api/async_sse.py +248 -0
- docsgpt/api/connector/routes.py +551 -0
- docsgpt/api/devices/__init__.py +11 -0
- docsgpt/api/devices/auth.py +141 -0
- docsgpt/api/devices/pairing.py +518 -0
- docsgpt/api/devices/routes.py +327 -0
- docsgpt/api/devices/session.py +272 -0
- docsgpt/api/events/__init__.py +0 -0
- docsgpt/api/events/routes.py +537 -0
- docsgpt/api/internal/__init__.py +0 -0
- docsgpt/api/internal/routes.py +171 -0
- docsgpt/api/oidc/__init__.py +11 -0
- docsgpt/api/oidc/denylist.py +107 -0
- docsgpt/api/oidc/provider.py +270 -0
- docsgpt/api/oidc/routes.py +670 -0
- docsgpt/api/scim/__init__.py +11 -0
- docsgpt/api/scim/routes.py +452 -0
- docsgpt/api/user/__init__.py +5 -0
- docsgpt/api/user/agents/__init__.py +17 -0
- docsgpt/api/user/agents/folders.py +366 -0
- docsgpt/api/user/agents/guardrails.py +156 -0
- docsgpt/api/user/agents/portability.py +1800 -0
- docsgpt/api/user/agents/routes.py +1941 -0
- docsgpt/api/user/agents/sharing.py +282 -0
- docsgpt/api/user/agents/webhooks.py +232 -0
- docsgpt/api/user/analytics/__init__.py +5 -0
- docsgpt/api/user/analytics/routes.py +1124 -0
- docsgpt/api/user/artifacts/__init__.py +5 -0
- docsgpt/api/user/artifacts/authz.py +168 -0
- docsgpt/api/user/artifacts/routes.py +402 -0
- docsgpt/api/user/attachments/__init__.py +5 -0
- docsgpt/api/user/attachments/routes.py +837 -0
- docsgpt/api/user/authz.py +97 -0
- docsgpt/api/user/base.py +431 -0
- docsgpt/api/user/conversations/__init__.py +5 -0
- docsgpt/api/user/conversations/routes.py +489 -0
- docsgpt/api/user/idempotency.py +294 -0
- docsgpt/api/user/me/__init__.py +3 -0
- docsgpt/api/user/me/routes.py +34 -0
- docsgpt/api/user/models/__init__.py +3 -0
- docsgpt/api/user/models/routes.py +574 -0
- docsgpt/api/user/prompts/__init__.py +5 -0
- docsgpt/api/user/prompts/routes.py +233 -0
- docsgpt/api/user/reconciliation.py +501 -0
- docsgpt/api/user/routes.py +87 -0
- docsgpt/api/user/scheduler_dispatcher.py +186 -0
- docsgpt/api/user/scheduler_worker.py +450 -0
- docsgpt/api/user/schedules/__init__.py +5 -0
- docsgpt/api/user/schedules/routes.py +621 -0
- docsgpt/api/user/sharing/__init__.py +5 -0
- docsgpt/api/user/sharing/routes.py +393 -0
- docsgpt/api/user/sources/__init__.py +13 -0
- docsgpt/api/user/sources/chunks.py +311 -0
- docsgpt/api/user/sources/retrieval_test.py +254 -0
- docsgpt/api/user/sources/routes.py +1331 -0
- docsgpt/api/user/sources/upload.py +1141 -0
- docsgpt/api/user/tasks.py +863 -0
- docsgpt/api/user/team_authz.py +109 -0
- docsgpt/api/user/team_sharing.py +124 -0
- docsgpt/api/user/teams/__init__.py +5 -0
- docsgpt/api/user/teams/routes.py +636 -0
- docsgpt/api/user/tools/__init__.py +6 -0
- docsgpt/api/user/tools/mcp.py +516 -0
- docsgpt/api/user/tools/routes.py +1030 -0
- docsgpt/api/user/utils.py +75 -0
- docsgpt/api/user/workflows/__init__.py +3 -0
- docsgpt/api/user/workflows/routes.py +593 -0
- docsgpt/api/v1/__init__.py +3 -0
- docsgpt/api/v1/idempotency.py +260 -0
- docsgpt/api/v1/routes.py +649 -0
- docsgpt/api/v1/session_store.py +99 -0
- docsgpt/api/v1/translator.py +680 -0
- docsgpt/app.py +374 -0
- docsgpt/asgi.py +46 -0
- docsgpt/auth.py +41 -0
- docsgpt/cache.py +337 -0
- docsgpt/celery_init.py +212 -0
- docsgpt/celeryconfig.py +69 -0
- docsgpt/cli.py +180 -0
- docsgpt/core/__init__.py +0 -0
- docsgpt/core/db_uri.py +89 -0
- docsgpt/core/json_schema_utils.py +34 -0
- docsgpt/core/log_context.py +57 -0
- docsgpt/core/logging_config.py +112 -0
- docsgpt/core/model_registry.py +389 -0
- docsgpt/core/model_settings.py +99 -0
- docsgpt/core/model_utils.py +183 -0
- docsgpt/core/model_yaml.py +395 -0
- docsgpt/core/models/README.md +251 -0
- docsgpt/core/models/_defaults.yaml +18 -0
- docsgpt/core/models/anthropic.yaml +23 -0
- docsgpt/core/models/deepseek.yaml +18 -0
- docsgpt/core/models/docsgpt.yaml +7 -0
- docsgpt/core/models/examples/mistral.yaml.example +31 -0
- docsgpt/core/models/google.yaml +17 -0
- docsgpt/core/models/groq.yaml +16 -0
- docsgpt/core/models/huggingface.yaml +7 -0
- docsgpt/core/models/novita.yaml +21 -0
- docsgpt/core/models/openai.yaml +20 -0
- docsgpt/core/models/openrouter.yaml +25 -0
- docsgpt/core/optional_deps.py +79 -0
- docsgpt/core/paths.py +50 -0
- docsgpt/core/secret_key.py +89 -0
- docsgpt/core/settings.py +585 -0
- docsgpt/core/shutdown.py +28 -0
- docsgpt/core/url_validation.py +183 -0
- docsgpt/devices/__init__.py +1 -0
- docsgpt/devices/broker.py +593 -0
- docsgpt/devices/denylist.py +172 -0
- docsgpt/devices/normalizer.py +84 -0
- docsgpt/devices/splitter.py +110 -0
- docsgpt/error.py +37 -0
- docsgpt/events/__init__.py +0 -0
- docsgpt/events/keys.py +52 -0
- docsgpt/events/publisher.py +144 -0
- docsgpt/graphrag/__init__.py +10 -0
- docsgpt/graphrag/extraction.py +338 -0
- docsgpt/graphrag/store.py +1136 -0
- docsgpt/guardrails/__init__.py +32 -0
- docsgpt/guardrails/base.py +122 -0
- docsgpt/guardrails/checks/__init__.py +26 -0
- docsgpt/guardrails/checks/heuristics.py +178 -0
- docsgpt/guardrails/checks/judge.py +133 -0
- docsgpt/guardrails/checks/patterns.py +281 -0
- docsgpt/guardrails/config.py +224 -0
- docsgpt/guardrails/engine.py +210 -0
- docsgpt/guardrails/guardrail_creator.py +63 -0
- docsgpt/guardrails/runtime.py +270 -0
- docsgpt/guardrails/stream.py +303 -0
- docsgpt/guardrails/types.py +225 -0
- docsgpt/gunicorn_conf.py +72 -0
- docsgpt/gunicorn_worker.py +57 -0
- docsgpt/llm/__init__.py +0 -0
- docsgpt/llm/anthropic.py +787 -0
- docsgpt/llm/base.py +871 -0
- docsgpt/llm/docsgpt_provider.py +62 -0
- docsgpt/llm/google_ai.py +738 -0
- docsgpt/llm/groq.py +17 -0
- docsgpt/llm/handlers/__init__.py +0 -0
- docsgpt/llm/handlers/anthropic.py +120 -0
- docsgpt/llm/handlers/base.py +1739 -0
- docsgpt/llm/handlers/google.py +120 -0
- docsgpt/llm/handlers/handler_creator.py +21 -0
- docsgpt/llm/handlers/openai.py +70 -0
- docsgpt/llm/llama_cpp.py +62 -0
- docsgpt/llm/llm_creator.py +130 -0
- docsgpt/llm/novita.py +17 -0
- docsgpt/llm/open_router.py +17 -0
- docsgpt/llm/openai.py +2138 -0
- docsgpt/llm/providers/__init__.py +45 -0
- docsgpt/llm/providers/_apikey_or_llm_name.py +51 -0
- docsgpt/llm/providers/anthropic.py +23 -0
- docsgpt/llm/providers/base.py +74 -0
- docsgpt/llm/providers/docsgpt.py +22 -0
- docsgpt/llm/providers/google.py +23 -0
- docsgpt/llm/providers/groq.py +23 -0
- docsgpt/llm/providers/huggingface.py +25 -0
- docsgpt/llm/providers/llama_cpp.py +19 -0
- docsgpt/llm/providers/novita.py +23 -0
- docsgpt/llm/providers/openai.py +37 -0
- docsgpt/llm/providers/openai_compatible.py +151 -0
- docsgpt/llm/providers/openrouter.py +23 -0
- docsgpt/logging.py +290 -0
- docsgpt/mcp_server.py +61 -0
- docsgpt/parser/__init__.py +1 -0
- docsgpt/parser/chunking.py +157 -0
- docsgpt/parser/chunking_creator.py +57 -0
- docsgpt/parser/chunking_strategies.py +320 -0
- docsgpt/parser/connectors/__init__.py +18 -0
- docsgpt/parser/connectors/_auth_utils.py +37 -0
- docsgpt/parser/connectors/base.py +140 -0
- docsgpt/parser/connectors/confluence/__init__.py +4 -0
- docsgpt/parser/connectors/confluence/auth.py +221 -0
- docsgpt/parser/connectors/confluence/loader.py +417 -0
- docsgpt/parser/connectors/connector_creator.py +89 -0
- docsgpt/parser/connectors/google_drive/__init__.py +10 -0
- docsgpt/parser/connectors/google_drive/auth.py +269 -0
- docsgpt/parser/connectors/google_drive/loader.py +561 -0
- docsgpt/parser/connectors/share_point/__init__.py +10 -0
- docsgpt/parser/connectors/share_point/auth.py +153 -0
- docsgpt/parser/connectors/share_point/loader.py +650 -0
- docsgpt/parser/document_reader.py +628 -0
- docsgpt/parser/embedding_pipeline.py +479 -0
- docsgpt/parser/file/__init__.py +1 -0
- docsgpt/parser/file/anydoc_parser.py +417 -0
- docsgpt/parser/file/audio_parser.py +48 -0
- docsgpt/parser/file/base.py +19 -0
- docsgpt/parser/file/base_parser.py +133 -0
- docsgpt/parser/file/bulk.py +650 -0
- docsgpt/parser/file/constants.py +102 -0
- docsgpt/parser/file/docling_parser.py +1014 -0
- docsgpt/parser/file/docs_parser.py +70 -0
- docsgpt/parser/file/epub_parser.py +28 -0
- docsgpt/parser/file/html_parser.py +238 -0
- docsgpt/parser/file/image_parser.py +31 -0
- docsgpt/parser/file/json_parser.py +57 -0
- docsgpt/parser/file/markdown_parser.py +145 -0
- docsgpt/parser/file/ocr_parser.py +874 -0
- docsgpt/parser/file/openapi3_parser.py +51 -0
- docsgpt/parser/file/pdf_trust.py +280 -0
- docsgpt/parser/file/pdfium_parser.py +261 -0
- docsgpt/parser/file/pptx_parser.py +75 -0
- docsgpt/parser/file/rst_parser.py +201 -0
- docsgpt/parser/file/tableize.py +105 -0
- docsgpt/parser/file/tabular_parser.py +280 -0
- docsgpt/parser/remote/base.py +19 -0
- docsgpt/parser/remote/crawler_loader.py +102 -0
- docsgpt/parser/remote/crawler_markdown.py +187 -0
- docsgpt/parser/remote/github_loader.py +454 -0
- docsgpt/parser/remote/reddit_loader.py +89 -0
- docsgpt/parser/remote/remote_creator.py +92 -0
- docsgpt/parser/remote/s3_loader.py +440 -0
- docsgpt/parser/remote/sitemap_loader.py +111 -0
- docsgpt/parser/remote/web_loader.py +57 -0
- docsgpt/parser/schema/__init__.py +1 -0
- docsgpt/parser/schema/base.py +34 -0
- docsgpt/parser/schema/schema.py +64 -0
- docsgpt/parser/tokenization.py +291 -0
- docsgpt/prompts/chat_reduce_prompt.txt +3 -0
- docsgpt/prompts/composer.py +99 -0
- docsgpt/prompts/compression/v1.0.txt +35 -0
- docsgpt/prompts/fragments/answering/agentic_creative.txt +8 -0
- docsgpt/prompts/fragments/answering/agentic_default.txt +7 -0
- docsgpt/prompts/fragments/answering/agentic_strict.txt +7 -0
- docsgpt/prompts/fragments/answering/classic_creative.txt +7 -0
- docsgpt/prompts/fragments/answering/classic_default.txt +6 -0
- docsgpt/prompts/fragments/answering/classic_strict.txt +6 -0
- docsgpt/prompts/fragments/attachments.txt +11 -0
- docsgpt/prompts/fragments/boundaries.txt +2 -0
- docsgpt/prompts/fragments/formatting.txt +5 -0
- docsgpt/prompts/fragments/identity.txt +2 -0
- docsgpt/prompts/fragments/memory.txt +10 -0
- docsgpt/prompts/fragments/persona.txt +8 -0
- docsgpt/prompts/fragments/platform.txt +4 -0
- docsgpt/prompts/partials/platform_capabilities.txt +12 -0
- docsgpt/prompts/research/clarification.txt +23 -0
- docsgpt/prompts/research/planning.txt +23 -0
- docsgpt/prompts/research/step.txt +13 -0
- docsgpt/prompts/research/synthesis.txt +22 -0
- docsgpt/retriever/__init__.py +0 -0
- docsgpt/retriever/base.py +10 -0
- docsgpt/retriever/classic_rag.py +419 -0
- docsgpt/retriever/dispatcher.py +349 -0
- docsgpt/retriever/fanout.py +190 -0
- docsgpt/retriever/graph_rag.py +359 -0
- docsgpt/retriever/hybrid_rag.py +85 -0
- docsgpt/retriever/labels.py +38 -0
- docsgpt/retriever/retriever_creator.py +25 -0
- docsgpt/retriever/stages/__init__.py +1 -0
- docsgpt/retriever/stages/prescreen.py +248 -0
- docsgpt/sandbox/__init__.py +1 -0
- docsgpt/sandbox/artifacts_capture.py +488 -0
- docsgpt/sandbox/base.py +90 -0
- docsgpt/sandbox/daytona.py +688 -0
- docsgpt/sandbox/jupyter_gateway.py +676 -0
- docsgpt/sandbox/manager.py +403 -0
- docsgpt/sandbox/sandbox_creator.py +91 -0
- docsgpt/scripts/__init__.py +0 -0
- docsgpt/scripts/prefetch_models.py +123 -0
- docsgpt/scripts/reembed.py +542 -0
- docsgpt/scripts/verify_offline.py +161 -0
- docsgpt/security/__init__.py +0 -0
- docsgpt/security/encryption.py +88 -0
- docsgpt/security/safe_url.py +593 -0
- docsgpt/security/zip_archive.py +401 -0
- docsgpt/seed/__init__.py +0 -0
- docsgpt/seed/commands.py +21 -0
- docsgpt/seed/config/agents_template.yaml +36 -0
- docsgpt/seed/config/premade_agents.yaml +94 -0
- docsgpt/seed/seeder.py +349 -0
- docsgpt/services/__init__.py +0 -0
- docsgpt/services/search_service.py +259 -0
- docsgpt/storage/__init__.py +0 -0
- docsgpt/storage/base.py +170 -0
- docsgpt/storage/db/__init__.py +10 -0
- docsgpt/storage/db/base_repository.py +67 -0
- docsgpt/storage/db/bootstrap.py +524 -0
- docsgpt/storage/db/embeddings_pin.py +150 -0
- docsgpt/storage/db/engine.py +98 -0
- docsgpt/storage/db/models.py +1081 -0
- docsgpt/storage/db/redaction.py +64 -0
- docsgpt/storage/db/repositories/__init__.py +11 -0
- docsgpt/storage/db/repositories/admin_stats.py +137 -0
- docsgpt/storage/db/repositories/agent_folders.py +140 -0
- docsgpt/storage/db/repositories/agents.py +385 -0
- docsgpt/storage/db/repositories/app_metadata.py +75 -0
- docsgpt/storage/db/repositories/artifacts.py +627 -0
- docsgpt/storage/db/repositories/attachments.py +307 -0
- docsgpt/storage/db/repositories/auth_events.py +108 -0
- docsgpt/storage/db/repositories/connector_sessions.py +317 -0
- docsgpt/storage/db/repositories/conversations.py +1368 -0
- docsgpt/storage/db/repositories/device_audit_log.py +183 -0
- docsgpt/storage/db/repositories/device_auto_approve_patterns.py +81 -0
- docsgpt/storage/db/repositories/devices.py +142 -0
- docsgpt/storage/db/repositories/guardrail_events.py +170 -0
- docsgpt/storage/db/repositories/idempotency.py +346 -0
- docsgpt/storage/db/repositories/ingest_chunk_progress.py +148 -0
- docsgpt/storage/db/repositories/memories.py +115 -0
- docsgpt/storage/db/repositories/message_events.py +298 -0
- docsgpt/storage/db/repositories/notes.py +88 -0
- docsgpt/storage/db/repositories/pending_tool_state.py +272 -0
- docsgpt/storage/db/repositories/prompts.py +217 -0
- docsgpt/storage/db/repositories/reconciliation.py +393 -0
- docsgpt/storage/db/repositories/schedule_runs.py +278 -0
- docsgpt/storage/db/repositories/schedules.py +352 -0
- docsgpt/storage/db/repositories/shared_conversations.py +241 -0
- docsgpt/storage/db/repositories/sources.py +448 -0
- docsgpt/storage/db/repositories/stack_logs.py +124 -0
- docsgpt/storage/db/repositories/team_members.py +197 -0
- docsgpt/storage/db/repositories/team_resource_grants.py +167 -0
- docsgpt/storage/db/repositories/team_scope.py +113 -0
- docsgpt/storage/db/repositories/teams.py +158 -0
- docsgpt/storage/db/repositories/todos.py +258 -0
- docsgpt/storage/db/repositories/token_usage.py +312 -0
- docsgpt/storage/db/repositories/tool_call_attempts.py +208 -0
- docsgpt/storage/db/repositories/user_custom_models.py +201 -0
- docsgpt/storage/db/repositories/user_logs.py +50 -0
- docsgpt/storage/db/repositories/user_roles.py +115 -0
- docsgpt/storage/db/repositories/user_tools.py +238 -0
- docsgpt/storage/db/repositories/users.py +439 -0
- docsgpt/storage/db/repositories/wiki_pages.py +269 -0
- docsgpt/storage/db/repositories/workflow_edges.py +173 -0
- docsgpt/storage/db/repositories/workflow_nodes.py +167 -0
- docsgpt/storage/db/repositories/workflow_runs.py +144 -0
- docsgpt/storage/db/repositories/workflows.py +271 -0
- docsgpt/storage/db/serialization.py +93 -0
- docsgpt/storage/db/session.py +67 -0
- docsgpt/storage/db/source_config.py +197 -0
- docsgpt/storage/db/source_ids.py +23 -0
- docsgpt/storage/local.py +194 -0
- docsgpt/storage/s3.py +294 -0
- docsgpt/storage/storage_creator.py +32 -0
- docsgpt/streaming/__init__.py +0 -0
- docsgpt/streaming/async_broadcast_channel.py +119 -0
- docsgpt/streaming/async_event_replay.py +232 -0
- docsgpt/streaming/async_redis.py +47 -0
- docsgpt/streaming/broadcast_channel.py +144 -0
- docsgpt/streaming/event_replay.py +260 -0
- docsgpt/streaming/keys.py +19 -0
- docsgpt/streaming/message_journal.py +447 -0
- docsgpt/streaming/sse_keepalive.py +72 -0
- docsgpt/stt/__init__.py +1 -0
- docsgpt/stt/base.py +15 -0
- docsgpt/stt/constants.py +15 -0
- docsgpt/stt/faster_whisper_stt.py +70 -0
- docsgpt/stt/live_session.py +201 -0
- docsgpt/stt/openai_stt.py +66 -0
- docsgpt/stt/stt_creator.py +17 -0
- docsgpt/stt/upload_limits.py +43 -0
- docsgpt/templates/__init__.py +0 -0
- docsgpt/templates/namespaces.py +395 -0
- docsgpt/templates/template_engine.py +182 -0
- docsgpt/tts/base.py +10 -0
- docsgpt/tts/elevenlabs.py +31 -0
- docsgpt/tts/google_tts.py +19 -0
- docsgpt/tts/tts_creator.py +18 -0
- docsgpt/updates/__init__.py +0 -0
- docsgpt/updates/version_check.py +304 -0
- docsgpt/upload_limits.py +306 -0
- docsgpt/usage.py +307 -0
- docsgpt/utils.py +517 -0
- docsgpt/vectorstore/__init__.py +0 -0
- docsgpt/vectorstore/base.py +455 -0
- docsgpt/vectorstore/document_class.py +8 -0
- docsgpt/vectorstore/elasticsearch.py +225 -0
- docsgpt/vectorstore/embeddings_delegated.py +254 -0
- docsgpt/vectorstore/embeddings_local.py +356 -0
- docsgpt/vectorstore/embeddings_openai.py +89 -0
- docsgpt/vectorstore/embeddings_tasks.py +29 -0
- docsgpt/vectorstore/faiss.py +385 -0
- docsgpt/vectorstore/faiss_docstore.py +230 -0
- docsgpt/vectorstore/lancedb.py +132 -0
- docsgpt/vectorstore/milvus.py +220 -0
- docsgpt/vectorstore/model_registry.py +177 -0
- docsgpt/vectorstore/mongodb.py +236 -0
- docsgpt/vectorstore/pgconn.py +135 -0
- docsgpt/vectorstore/pgvector.py +773 -0
- docsgpt/vectorstore/qdrant.py +219 -0
- docsgpt/vectorstore/vector_creator.py +24 -0
- docsgpt/version.py +10 -0
- docsgpt/worker.py +2893 -0
- docsgpt/wsgi.py +5 -0
- docsgpt-0.19.0.dist-info/METADATA +280 -0
- docsgpt-0.19.0.dist-info/RECORD +488 -0
- docsgpt-0.19.0.dist-info/WHEEL +4 -0
- docsgpt-0.19.0.dist-info/entry_points.txt +2 -0
- docsgpt-0.19.0.dist-info/licenses/LICENSE +21 -0
docsgpt/__init__.py
ADDED
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
3
|
+
from docsgpt.agents.agentic_agent import AgenticAgent
|
|
4
|
+
from docsgpt.agents.classic_agent import ClassicAgent
|
|
5
|
+
from docsgpt.agents.research_agent import ResearchAgent
|
|
6
|
+
from docsgpt.agents.workflow_agent import WorkflowAgent
|
|
7
|
+
|
|
8
|
+
logger = logging.getLogger(__name__)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AgentCreator:
|
|
12
|
+
agents = {
|
|
13
|
+
"classic": ClassicAgent,
|
|
14
|
+
"react": ClassicAgent, # backwards compat: react falls back to classic
|
|
15
|
+
"agentic": AgenticAgent,
|
|
16
|
+
"research": ResearchAgent,
|
|
17
|
+
"workflow": WorkflowAgent,
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@classmethod
|
|
21
|
+
def create_agent(cls, type, *args, **kwargs):
|
|
22
|
+
agent_class = cls.agents.get(type.lower())
|
|
23
|
+
if not agent_class:
|
|
24
|
+
raise ValueError(f"No agent class found for type {type}")
|
|
25
|
+
return agent_class(*args, **kwargs)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from typing import Dict, Generator, Optional
|
|
3
|
+
|
|
4
|
+
from docsgpt.agents.base import BaseAgent
|
|
5
|
+
from docsgpt.agents.tools.internal_search import add_internal_search_tool
|
|
6
|
+
from docsgpt.agents.tools.wiki import add_wiki_tool
|
|
7
|
+
from docsgpt.logging import LogContext
|
|
8
|
+
|
|
9
|
+
logger = logging.getLogger(__name__)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AgenticAgent(BaseAgent):
|
|
13
|
+
"""Agent where the LLM controls retrieval via tools.
|
|
14
|
+
|
|
15
|
+
Unlike ClassicAgent which pre-fetches docs into the prompt,
|
|
16
|
+
AgenticAgent gives the LLM an internal_search tool so it can
|
|
17
|
+
decide when, what, and whether to search.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
def __init__(
|
|
21
|
+
self,
|
|
22
|
+
retriever_config: Optional[Dict] = None,
|
|
23
|
+
wiki_config: Optional[Dict] = None,
|
|
24
|
+
*args,
|
|
25
|
+
**kwargs,
|
|
26
|
+
):
|
|
27
|
+
super().__init__(*args, **kwargs)
|
|
28
|
+
self.retriever_config = retriever_config or {}
|
|
29
|
+
self.wiki_config = wiki_config or {}
|
|
30
|
+
|
|
31
|
+
def _gen_inner(
|
|
32
|
+
self, query: str, log_context: LogContext
|
|
33
|
+
) -> Generator[Dict, None, None]:
|
|
34
|
+
tools_dict = self.tool_executor.get_tools()
|
|
35
|
+
add_internal_search_tool(tools_dict, self.retriever_config)
|
|
36
|
+
if self.wiki_config:
|
|
37
|
+
add_wiki_tool(tools_dict, self.wiki_config)
|
|
38
|
+
self._prepare_tools(tools_dict)
|
|
39
|
+
|
|
40
|
+
# 4. Build messages (prompt has NO pre-fetched docs)
|
|
41
|
+
messages = self._build_messages(self.prompt, query)
|
|
42
|
+
|
|
43
|
+
# 5. Call LLM — the handler manages the tool loop
|
|
44
|
+
llm_response = self._llm_gen(messages, log_context)
|
|
45
|
+
|
|
46
|
+
yield from self._handle_response(
|
|
47
|
+
llm_response, tools_dict, messages, log_context
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
# 6. Collect sources from internal search tool results
|
|
51
|
+
self._collect_internal_sources()
|
|
52
|
+
|
|
53
|
+
yield {"sources": self.retrieved_docs}
|
|
54
|
+
yield {"tool_calls": self._get_truncated_tool_calls()}
|
|
55
|
+
|
|
56
|
+
log_context.stacks.append(
|
|
57
|
+
{"component": "agent", "data": {"tool_calls": self.tool_calls.copy()}}
|
|
58
|
+
)
|