Hugging Face Integration. Remove OpenAI and Anthropic and DeepSeek. Add Hugging Face.

This commit is contained in:
ajaysi
2025-10-29 20:15:04 +05:30
parent 4431cd9848
commit 3219e6bbe4
15 changed files with 883 additions and 482 deletions

View File

@@ -39,7 +39,7 @@ class CompetitorAnalyzer:
}}
"""
from services.llm_providers.gemini_provider import gemini_structured_json_response
from services.llm_providers.main_text_generation import llm_text_gen
competitor_schema = {
"type": "object",
@@ -55,11 +55,9 @@ class CompetitorAnalyzer:
"required": ["top_competitors", "content_gaps", "opportunities", "competitive_advantages", "market_positioning", "industry_leaders", "analysis_notes"]
}
competitor_analysis = gemini_structured_json_response(
competitor_analysis = llm_text_gen(
prompt=competitor_prompt,
schema=competitor_schema,
temperature=0.3,
max_tokens=4000
json_struct=competitor_schema
)
if isinstance(competitor_analysis, dict) and 'error' not in competitor_analysis:

View File

@@ -48,7 +48,7 @@ class ContentAngleGenerator:
}}
"""
from services.llm_providers.gemini_provider import gemini_structured_json_response
from services.llm_providers.main_text_generation import llm_text_gen
angles_schema = {
"type": "object",
@@ -63,11 +63,9 @@ class ContentAngleGenerator:
"required": ["content_angles"]
}
angles_result = gemini_structured_json_response(
angles_result = llm_text_gen(
prompt=angles_prompt,
schema=angles_schema,
temperature=0.7,
max_tokens=4000
json_struct=angles_schema
)
if isinstance(angles_result, dict) and 'content_angles' in angles_result:

View File

@@ -44,7 +44,7 @@ class KeywordAnalyzer:
}}
"""
from services.llm_providers.gemini_provider import gemini_structured_json_response
from services.llm_providers.main_text_generation import llm_text_gen
keyword_schema = {
"type": "object",
@@ -62,11 +62,9 @@ class KeywordAnalyzer:
"required": ["primary", "secondary", "long_tail", "search_intent", "difficulty", "content_gaps", "semantic_keywords", "trending_terms", "analysis_insights"]
}
keyword_analysis = gemini_structured_json_response(
keyword_analysis = llm_text_gen(
prompt=keyword_prompt,
schema=keyword_schema,
temperature=0.3,
max_tokens=4000
json_struct=keyword_schema
)
if isinstance(keyword_analysis, dict) and 'error' not in keyword_analysis: