AI Researcher and Video Studio implementation complete

This commit is contained in:
ajaysi
2026-01-05 15:49:51 +05:30
parent b134e9dc7e
commit 0b63ae7fc1
200 changed files with 39535 additions and 1375 deletions

View File

@@ -230,6 +230,14 @@ class ResearchIntent(BaseModel):
le=1.0,
description="Confidence in the intent inference"
)
confidence_reason: Optional[str] = Field(
None,
description="Reason for the confidence level"
)
great_example: Optional[str] = Field(
None,
description="Example of what a great input would look like (if confidence is low)"
)
needs_clarification: bool = Field(
False,
description="True if AI is uncertain and needs user clarification"
@@ -281,6 +289,8 @@ class IntentInferenceResponse(BaseModel):
default_factory=list,
description="Quick options for user to confirm/modify intent"
)
confidence_reason: Optional[str] = Field(None, description="Reason for confidence level")
great_example: Optional[str] = Field(None, description="Example of great input (if confidence is low)")
# ============================================================================

View File

@@ -0,0 +1,51 @@
"""
Google Trends Data Models
Pydantic models for Google Trends API responses.
"""
from typing import List, Dict, Any, Optional
from pydantic import BaseModel, Field
from datetime import datetime
class GoogleTrendsData(BaseModel):
"""Structured Google Trends data."""
interest_over_time: List[Dict[str, Any]] = Field(default_factory=list, description="Time series interest data")
interest_by_region: List[Dict[str, Any]] = Field(default_factory=list, description="Geographic interest data")
related_topics: Dict[str, List[Dict[str, Any]]] = Field(
default_factory=dict,
description="Related topics: {top: [...], rising: [...]}"
)
related_queries: Dict[str, List[Dict[str, Any]]] = Field(
default_factory=dict,
description="Related queries: {top: [...], rising: [...]}"
)
trending_searches: Optional[List[str]] = Field(None, description="Current trending searches")
timeframe: str = Field(..., description="Timeframe used (e.g., 'today 12-m')")
geo: str = Field(..., description="Geographic region (e.g., 'US', 'GB')")
keywords: List[str] = Field(..., description="Keywords analyzed")
timestamp: datetime = Field(default_factory=datetime.utcnow, description="When data was fetched")
class TrendsConfig(BaseModel):
"""Google Trends configuration with AI-driven justifications."""
enabled: bool = Field(True, description="Whether trends analysis is enabled")
keywords: List[str] = Field(..., description="AI-optimized keywords for trends analysis")
keywords_justification: str = Field(..., description="Why these keywords were chosen")
timeframe: str = Field(default="today 12-m", description="Timeframe: 'today 1-y', 'today 12-m', 'all', etc.")
timeframe_justification: str = Field(..., description="Why this timeframe was chosen")
geo: str = Field(default="US", description="Country code (e.g., 'US', 'GB', 'IN')")
geo_justification: str = Field(..., description="Why this geographic region was chosen")
expected_insights: List[str] = Field(
default_factory=list,
description="What insights trends will uncover for content generation"
)
class TrendsAnalysisResponse(BaseModel):
"""Response from trends analysis endpoint."""
success: bool
data: Optional[GoogleTrendsData] = None
error_message: Optional[str] = None
cached: bool = Field(False, description="Whether data was served from cache")