feat: Add AI Market Research module - Introduced Automated Market Analysis and Competitive Intelligence feature - Added 'Market Research' view to Sidebar and main navigation - Implemented MarketResearcher component with price comparison matrix and feature tables - Updated Ollama, Qwen, and Z.AI services to support market research generation - Added localized translations in English, Russian, and Hebrew

This commit is contained in:
Gemini AI
2025-12-28 03:02:00 +04:00
Unverified
parent 2c7b233bca
commit 792685ca6b
10 changed files with 810 additions and 3 deletions

View File

@@ -934,6 +934,55 @@ Perform a DEEP 360° competitive intelligence analysis and generate 5-7 strategi
return this.chatCompletion([systemMessage, userMessage], model || "coder-model");
}
async generateMarketResearch(
options: {
websiteUrl: string;
additionalUrls?: string[];
competitors: string[];
productMapping: string;
specialInstructions?: string;
},
model?: string
): Promise<APIResponse<string>> {
const { websiteUrl, additionalUrls = [], competitors = [], productMapping, specialInstructions = "" } = options;
const systemMessage: ChatMessage = {
role: "system",
content: `You are a WORLD-CLASS Market Research Analyst. Perform a deep-dive automated market analysis.
OUTPUT FORMAT - JSON:
{
"executiveSummary": "findings",
"priceComparisonMatrix": [
{ "product": "P", "userPrice": "$", "competitorPrices": [{ "competitor": "C", "price": "$" }] }
],
"featureComparisonTable": [
{ "feature": "F", "userStatus": "status", "competitorStatus": [{ "competitor": "C", "status": "status" }] }
],
"marketPositioning": { "landscape": "LS", "segmentation": "SG" },
"competitiveAnalysis": { "advantages": [], "disadvantages": [] },
"recommendations": [],
"methodology": "method"
}
REQUIREMENTS: Use provided URLs. Be realistic.`,
};
const userMessage: ChatMessage = {
role: "user",
content: `🔬 MARKET RESEARCH REQUEST 🔬
WEBSITE: ${websiteUrl}
PAGES: ${additionalUrls.join(", ")}
COMPETITORS: ${competitors.join(", ")}
MAPPING: ${productMapping}
${specialInstructions ? `CUSTOM: ${specialInstructions}` : ""}
Perform analysis based on provided instructions.`,
};
return this.chatCompletion([systemMessage, userMessage], model || "coder-model");
}
async listModels(): Promise<APIResponse<string[]>> {
const models = [
"coder-model",