Subscription dashboard improvements, AI text generation limit, and other fixes.
This commit is contained in:
@@ -65,7 +65,7 @@ class LinkedInPostRequest(BaseModel):
|
||||
persona_override: Optional[Dict[str, Any]] = Field(default=None, description="Session-only persona overrides to apply without saving")
|
||||
|
||||
class Config:
|
||||
schema_extra = {
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"topic": "AI in healthcare transformation",
|
||||
"industry": "Healthcare",
|
||||
@@ -102,7 +102,7 @@ class LinkedInArticleRequest(BaseModel):
|
||||
persona_override: Optional[Dict[str, Any]] = Field(default=None, description="Session-only persona overrides to apply without saving")
|
||||
|
||||
class Config:
|
||||
schema_extra = {
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"topic": "Digital transformation in manufacturing",
|
||||
"industry": "Manufacturing",
|
||||
@@ -135,7 +135,7 @@ class LinkedInCarouselRequest(BaseModel):
|
||||
include_citations: bool = Field(default=True, description="Whether to include inline citations")
|
||||
|
||||
class Config:
|
||||
schema_extra = {
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"topic": "Future of remote work",
|
||||
"industry": "Technology",
|
||||
@@ -167,7 +167,7 @@ class LinkedInVideoScriptRequest(BaseModel):
|
||||
include_citations: bool = Field(default=True, description="Whether to include inline citations")
|
||||
|
||||
class Config:
|
||||
schema_extra = {
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"topic": "Cybersecurity best practices",
|
||||
"industry": "Technology",
|
||||
@@ -197,7 +197,7 @@ class LinkedInCommentResponseRequest(BaseModel):
|
||||
grounding_level: GroundingLevel = Field(default=GroundingLevel.BASIC, description="Level of content grounding")
|
||||
|
||||
class Config:
|
||||
schema_extra = {
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"original_comment": "Great insights on AI implementation!",
|
||||
"post_context": "Post about AI transformation in healthcare",
|
||||
@@ -353,7 +353,7 @@ class LinkedInPostResponse(BaseModel):
|
||||
grounding_status: Optional[Dict[str, Any]] = Field(None, description="Grounding operation status")
|
||||
|
||||
class Config:
|
||||
schema_extra = {
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"success": True,
|
||||
"data": {
|
||||
|
||||
@@ -48,8 +48,9 @@ class TaskExecutionLog(Base):
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
task_id = Column(Integer, ForeignKey("monitoring_tasks.id"), nullable=False)
|
||||
user_id = Column(Integer, nullable=True) # User ID for user isolation (nullable for backward compatibility)
|
||||
execution_date = Column(DateTime, default=datetime.utcnow)
|
||||
status = Column(String(50), nullable=False) # 'success', 'failed', 'skipped'
|
||||
status = Column(String(50), nullable=False) # 'success', 'failed', 'skipped', 'running'
|
||||
result_data = Column(JSON, nullable=True)
|
||||
error_message = Column(Text, nullable=True)
|
||||
execution_time_ms = Column(Integer, nullable=True)
|
||||
|
||||
@@ -50,16 +50,22 @@ class SubscriptionPlan(Base):
|
||||
price_monthly = Column(Float, nullable=False, default=0.0)
|
||||
price_yearly = Column(Float, nullable=False, default=0.0)
|
||||
|
||||
# API Call Limits
|
||||
gemini_calls_limit = Column(Integer, default=0) # 0 = unlimited
|
||||
openai_calls_limit = Column(Integer, default=0)
|
||||
anthropic_calls_limit = Column(Integer, default=0)
|
||||
mistral_calls_limit = Column(Integer, default=0)
|
||||
# Unified AI Text Generation Call Limit (applies to all LLM providers: gemini, openai, anthropic, mistral)
|
||||
# Note: This column may not exist in older databases - use getattr() when accessing
|
||||
ai_text_generation_calls_limit = Column(Integer, default=0, nullable=True) # 0 = unlimited, None if column doesn't exist
|
||||
|
||||
# Legacy per-provider limits (kept for backwards compatibility and analytics)
|
||||
gemini_calls_limit = Column(Integer, default=0) # 0 = unlimited (deprecated, use ai_text_generation_calls_limit)
|
||||
openai_calls_limit = Column(Integer, default=0) # (deprecated, use ai_text_generation_calls_limit)
|
||||
anthropic_calls_limit = Column(Integer, default=0) # (deprecated, use ai_text_generation_calls_limit)
|
||||
mistral_calls_limit = Column(Integer, default=0) # (deprecated, use ai_text_generation_calls_limit)
|
||||
|
||||
# Other API Call Limits (non-LLM)
|
||||
tavily_calls_limit = Column(Integer, default=0)
|
||||
serper_calls_limit = Column(Integer, default=0)
|
||||
metaphor_calls_limit = Column(Integer, default=0)
|
||||
firecrawl_calls_limit = Column(Integer, default=0)
|
||||
stability_calls_limit = Column(Integer, default=0)
|
||||
stability_calls_limit = Column(Integer, default=0) # Image generation
|
||||
|
||||
# Token Limits (for LLM providers)
|
||||
gemini_tokens_limit = Column(Integer, default=0)
|
||||
|
||||
Reference in New Issue
Block a user