fix(rag): Add DEXSCREENER_CONNECTOR to searchable mapping

- Added DEXSCREENER_CONNECTOR to _CONNECTOR_TYPE_TO_SEARCHABLE in chat_deepagent.py
- This fixes LLM's inability to search DexScreener data despite it being indexed
- Root cause: connector was enabled in DB but missing from mapping, causing it to be filtered out
- Verified: LLM now successfully retrieves WETH price (~$2,442) with DexScreener citations

Related files:
- chat_deepagent.py: Added connector mapping
- knowledge_base.py: Added debug logging for DexScreener search
- connector_service.py: Fixed metadata field names (base_symbol, quote_symbol, dex)
- 85_add_dexscreener_connector.py: Migration for connector type
This commit is contained in:
API Test Bot 2026-02-01 14:20:34 +07:00
parent d654556eb8
commit b5d0413459
6 changed files with 170 additions and 4 deletions

View file

@ -17,13 +17,16 @@ depends_on = None
def upgrade():
"""Add DEXSCREENER_CONNECTOR to searchsourceconnectortype enum."""
"""Add DEXSCREENER_CONNECTOR to searchsourceconnectortype and documenttype enums."""
# Add new enum value using raw SQL
# Note: ALTER TYPE ... ADD VALUE cannot be executed inside a transaction block
# Alembic handles this automatically when using op.execute()
op.execute(
"ALTER TYPE searchsourceconnectortype ADD VALUE IF NOT EXISTS 'DEXSCREENER_CONNECTOR'"
)
op.execute(
"ALTER TYPE documenttype ADD VALUE IF NOT EXISTS 'DEXSCREENER_CONNECTOR'"
)
def downgrade():