passionweb-manuel-schnabel / ai-seo-helper

Generates SEO metadata based on content using AI. Currently several metadata for pages and articles of EXT:news can be generated using an additional button next to the corresponding input fields.
9 stars 5 forks source link

Documentation - Extend logic to other fields #12

Closed bznovak closed 2 months ago

bznovak commented 4 months ago

I need to add ai-seo-helper for abstract field.

Documentation has two issues.

  1. Add further configuration settings to ext_conf_template.txt (https://docs.typo3.org/p/passionweb/ai-seo-helper/0.6/en-us/Developer/Index.html#add-further-configuration-settings-to-ext-conf-template-txt). If im creating this in my own extension then ContentService does not know about it. Changing original extension ext_conf_template.txt is not an option. So how do I use ContentService with combined extConf of original and my own extension?
  2. Add function to controller (https://docs.typo3.org/p/passionweb/ai-seo-helper/0.6/en-us/Developer/Index.html#add-function-to-controller-e-g-to-classes-controller-ajax-aicontroller-php) offers a solution with "The function generateSuggestions() can be used from \Passionweb\AiSeoHelper\Service\ContentService", but that method does not exist in ContentService. Extending AiController is also not really an option because generateSuggestions() is private.

Maybe solving second issue will also be a solution for the first one.

passionweb-manuel-schnabel commented 2 months ago

Hey @bznovak ,

sorry for the very late reply.

If you already need this solution I will prepare it for you and send you an "unofficial" version of it.

Do you still need the functionality?

Best regards

Manu

bznovak commented 2 months ago

Hey @passionweb-manuel-schnabel ,

thanks for a reply.

Yeah, I still need this.

At the moment I modified your extension for my specific needs. This is not general enough solution for a pull request, and it also breaks any future extension updates for me.

If your solution will get into official version in the near future, then I can wait.

Kind regards

bznovak

passionweb-manuel-schnabel commented 2 months ago

As soon as possible I will create a new version and make it available to you exclusively.

The background is that with the next version (1.0.0) feature support for this extension will be discontinued, as there is a new extension with the AI ​​Suite (https://extensions.typo3.org/extension/ai_suite), which provides metadata generation in an optimized manner and also brings many other AI features.

passionweb-manuel-schnabel commented 2 months ago

Hey @bznovak ,

I have added the logic to the "abstract" field with the latest commit. Please require the dev-main branch and check if everything works as expected.

Greetings Manu

bznovak commented 2 months ago

I tested it, works great thanks. This solves my requirement for abstract field.

I have one more suggestion for this extension, and that is to not send complete page to AI, but just main tag content, so response from AI is only for content on the page, without header, footer, which are repeating and can taint response, specially keywords suggestions. But this might also be fixed with custom prompt telling AI to ignore all except main tag, I did not test this.

Thanks and regards bznovak