Uses AI to summarize PDF files
$config['ocha_ai_summarize.settings']['openai_token'] = 'xxx';
$config['ocha_ai_summarize.settings']['azure_endpoint'] = 'https://tst003.openai.azure.com/openai/deployments/tst003/chat/completions?api-version=2023-03-15-preview';
$config['ocha_ai_summarize.settings']['azure_apikey'] = 'yyy';
$config['ocha_ai_summarize.settings']['bedrock_endpoint'] = 'https://bedrock.us-east-1.amazonaws.com/model/amazon.titan-tg1-large/invoke';
$config['ocha_ai_summarize.settings']['bedrock_model'] = 'amazon.titan-tg1-large';
$config['ocha_ai_summarize.settings']['bedrock_access_key'] = 'x1';
$config['ocha_ai_summarize.settings']['bedrock_secret_key'] = 'x2';
$config['ocha_ai_summarize.settings']['claude_endpoint'] = 'https://api.anthropic.com/v1/complete';
$config['ocha_ai_summarize.settings']['claude_version'] = '2023-06-01';
$config['ocha_ai_summarize.settings']['claude_api_key'] = 'zz';
drush queue:run ocha_ai_summarize_extract_text --verbose
drush queue:run ocha_ai_summarize_summarize --verbose
drush queue:run ocha_ai_summarize_action_points --verbose
We can either use cron to run the queues or run them separately
- User creates a new Summary node providing a title and a PDF file and which brain to use
- A queue item is created to extract the text
drush queue:run ocha_ai_summarize_extract_text
- The node is updated and the extracted text is added
- A queue item is created to summarize the text
drush queue:run ocha_ai_summarize_summarize
- The node is updated and the summary is added
- User can proof-read and publish the node