Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust TaskProcessingListener to accept TextToText tasks #10616

Closed
julien-nc opened this issue Jan 28, 2025 · 2 comments · Fixed by #10620 or #10629
Closed

Adjust TaskProcessingListener to accept TextToText tasks #10616

julien-nc opened this issue Jan 28, 2025 · 2 comments · Fixed by #10620 or #10629
Assignees

Comments

@julien-nc
Copy link
Member

julien-nc commented Jan 28, 2025

I think the produced summaries are never handled by the TaskProcessingListener because it only expects TextToTextSummary tasks.
https://github.com/nextcloud/mail/blob/main/lib/Listener/TaskProcessingListener.php#L43

Also, this https://github.com/nextcloud/mail/blob/main/lib/Service/AiIntegrations/AiIntegrationsService.php#L69-L74 can be replaced by:

$availableTaskTypes = $this->taskProcessingManager->getAvailableTaskTypes();
if (!isset($availableTaskTypes[TextToText::ID])) {
	$this->logger->info('No text-to-text provider available');
	return;
}
@SebastianKrupinski
Copy link
Contributor

It have a look in to it. It was working during my tests

@SebastianKrupinski
Copy link
Contributor

@julien-nc

You where right somewhere between testing and final version TextToText::ID got changed to TextToTextSummary::ID

I adjusted the service to create a TextToTextSummary task instead as it makes more sense and I took your advice on the task provider check simplification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants