WIP- Try AI-Writer and Web research; working. Working on usuability aspects.

This commit is contained in:
AjaySi
2024-03-06 15:39:02 +05:30
parent 16e68c8959
commit 27f6952dd0
29 changed files with 399 additions and 602 deletions

View File

@@ -34,14 +34,14 @@ def write_blog_google_serp(search_keyword, search_results):
Google search Result: "{search_results}"
"""
logger.info("Generating blog and FAQs from web search result.")
if 'google' in gpt_providers:
if 'google' in gpt_providers.lower():
try:
response = gemini_text_response(prompt)
return response
except Exception as err:
logger.error(f"Failed to get response from gemini: {err}")
raise err
elif 'openai' in gpt_providers:
elif 'openai' in gpt_providers.lower():
try:
logger.info("Calling OpenAI LLM.")
response = openai_chatgpt(prompt)