AI Chat Assistant
The AI Chat Assistant is a multi-turn conversational interface that provides DeFi guidance with access to real-time market data, pool analytics, and portfolio context.
Capabilities
- DeFi guidance -- explanations of concepts, strategies, and protocol mechanics.
- Real-time market data -- current token prices, pool statistics, and volume metrics.
- Pool analytics -- APR comparisons, liquidity depth, and fee tier analysis.
- Portfolio context -- when a wallet is connected, the assistant is aware of the user's holdings, LP positions, and transaction history.
- QsnDEX feature guidance -- instructions on how to use swap, liquidity, launchpad, and other platform features.
Model
The chat assistant is powered by Llama 3.3 70B Versatile, selected for its strong conversational ability and capacity to handle nuanced, multi-step financial questions.
Context Awareness
The assistant maintains conversation history within a session, allowing for follow-up questions and iterative exploration of topics. It also has access to:
- Current market conditions for tokens traded on QsnDEX.
- The connected wallet's portfolio composition (if a wallet is connected).
- QsnDEX platform documentation and feature specifications.
Language Support
The assistant responds in the user's selected language. Currently supported languages are English (EN) and Russian (RU).
Rate Limiting
The chat endpoint is rate limited to 10 requests per hour per user to ensure fair access across the platform.
API
POST /api/ai/chat
Accepts a JSON body with the conversation history and returns the assistant's response. The request should include:
messages-- array of previous conversation turns.wallet(optional) -- wallet address for portfolio-aware responses.language-- preferred response language (enorru).