Blogen-V0.1 Added features. WIP

This commit is contained in:
AjaySi
2023-12-21 21:21:09 +05:30
parent eaf13c2d16
commit 8f89de7b69
21 changed files with 775 additions and 471 deletions

View File

@@ -68,11 +68,11 @@ def do_online_research(query):
f'Please use MLA format and markdown syntax.')
}]
# Run GPT-4
logging.info("Generating report with GPT-4...")
logging.info("Generating Research report with GPT-4...")
lc_messages = convert_openai_messages(prompt)
try:
report = ChatOpenAI(model='gpt-4', openai_api_key=openai_api_key).invoke(lc_messages).content
logging.info(f"\n Below is the online research report for given keywords/title: \n\n{report}")
#logging.info(f"\n Below is the online research report for given keywords/title: \n\n{report}")
return report
except Exception as err:
logging.error("Failed to generate do_online_research with ChatOpenAI")