Account created on 8 December 2020, over 4 years ago
  • Engineer Drupal - Backend at QED42 
#

Merge Requests

More

Recent comments

🇮🇳India annmarysruthy

This seems to be a duplicate of https://www.drupal.org/project/ai/issues/3533114 🐛 Notice on AI Content Suggestions Active .

🇮🇳India annmarysruthy

Reviewed the changes. Looks good to me. Tested scenarios:

  1. Without any provider: got error "No default AI provider or model set" but 2 warnings:
    [warning] Trying to access array offset on null AiCommands.php:84
    [warning] Trying to access array offset on null AiCommands.php:85
  2. Using invalid free tier key with openai provider. Input was accepted. Error: Unable to fetch response: Too Many Requests
  3. Using valid key with Openai. Interactive prompt appeared, accepted input and output was displayed successfully.
  4. Deleted the key from last step. Provider settings was kept the same as last step: Intercative prompt is displayed, accepted input from user, displayed "fetching Response.." and error: "Unable to fetch response: Error invoking model response: Could not load the OpenAI API key, please check your environment settings or your setup key."
🇮🇳India annmarysruthy

The above mentioned plugin managers are being used in modules such as ai agents, provider modules etc and changing the namespace here breaks these modules. Hence moving to 2.0.x

🇮🇳India annmarysruthy

@marcus_johansson Reviewed the changes. getting a fatal error in /admin/structure/ai_agent/add:

Fatal error: Type of Drupal\ai\Plugin\AiFunctionCall\ActionPluginBase::$data_type_converter_manager must be ?Drupal\ai\PluginManager\AiDataTypeConverterPluginManager (as in class Drupal\ai\Base\FunctionCallBase) in /var/www/html/modules/contrib/ai/src/Plugin/AiFunctionCall/ActionPluginBase.php on line 28

This could be fixed by updating the property type in ActionPluginBase to match the parent:

protected AiDataTypeConverterPluginManager $data_type_converter_manager,

to

protected ?AiDataTypeConverterPluginManager $data_type_converter_manager,

🇮🇳India annmarysruthy

annmarysruthy changed the visibility of the branch 1.2.x to hidden.

🇮🇳India annmarysruthy

annmarysruthy changed the visibility of the branch 3532682-spelling-error-in to hidden.

🇮🇳India annmarysruthy

@marcus_johansson Should we also deprecate the getTask() along with setTask() ?

as per my understanding these are the files/functions to be deprecated. Kindly confirm/correct:

  • modules/contrib/ai_agents/src/Task/TaskInterface.php
  • setTask() in modules/contrib/ai_agents/src/PluginInterfaces/AiAgentInterface.php
  • setTask() in modules/contrib/ai_agents/src/PluginBase/AiAgentBase.php
  • setTask() in modules/contrib/ai_agents/src/PluginBase/AiAgentEntityWrapper.php
🇮🇳India annmarysruthy

Raised MR !696. Added a "Translation status" setting to AI Translate config. You can now choose to keep the original entity's status or always create translations as drafts. It's a global setting for now — per-entity/bundle config can be explored later if needed. Redirect behavior setting not included in this MR.

🇮🇳India annmarysruthy

Added configurable option to include taxonomy term descriptions in tone prompts. Added "Use term description for tone description" checkbox in settings form (only available when "Choose own vocabulary for tone of voice options" is enabled) - when checked, the AI prompt includes both the term name and description providing more detailed tone guidance to the LLM.

Kindly review.

🇮🇳India annmarysruthy

annmarysruthy changed the visibility of the branch 3531117-casing-of-translatable to hidden.

🇮🇳India annmarysruthy

annmarysruthy changed the visibility of the branch 3531117-casing-of-translatable to active.

🇮🇳India annmarysruthy

annmarysruthy changed the visibility of the branch 3531117-casing-of-translatable to hidden.

🇮🇳India annmarysruthy

annmarysruthy changed the visibility of the branch 3530307-remove-ai-chatbot to hidden.

🇮🇳India annmarysruthy

@akhil babu setOutput() method is necessary in all tools and cannot be removed.

🇮🇳India annmarysruthy

annmarysruthy changed the visibility of the branch 3529732-remove-unnecessary-module to hidden.

🇮🇳India annmarysruthy

Tested the feature. Issues I Observed:

  1. 1. The placeholders are available in automator for advanced mode. but what does this placeholders stand for?
    {{ context }} - The cleaned text from the base field.
     {{ raw_context }} - The raw text from the base field. Can include HTML
    { max_amount }} - The max amount of entries to set. If unlimited this value will be empty.

    These explanations are valid only when we have selected a base field. but in advanced mode, there is no base field selected.

  2. Enabled automator for a field, Selected "Advanced Mode", used prompt "write an article on {{ context }}." and saved the setting. But did not get any response.
  3. Enabled automator for a field, Selected "base mode" and selected a field title as "Automator Base Field", then changed the mode to advanced mode and used the same prompt as above "write an article on {{ context }}." and saved the setting. Now I got ai response in the field with an article on title field(selected as base field).
🇮🇳India annmarysruthy

I found .module files in these modules too. should these be changed too

  • views_test_data
  • views_test_rss
  • toolbar_test
  • common_test
  • deprecation_test
  • entity_test
  • hook_collector_on_behalf_procedural
  • hook_collector_skip_procedural
  • hook_collector_skip_procedural_attribute
  • module_implements_alter_test
  • module_test
  • olivero_test
  • pager_test
  • system_test
  • theme_region_test
  • theme_test
  • twig_theme_test
🇮🇳India annmarysruthy

Could replicate the issue by disabling source plugin in a text format and running Generate with AI plugin.

Reviewed the MR. Changes from MR fixes the issue and Generate with AI works.

🇮🇳India annmarysruthy

Reviewed changes and tested the issue. The changes in MR fixes the issue. Moving to RTBC.

🇮🇳India annmarysruthy

annmarysruthy made their first commit to this issue’s fork.

🇮🇳India annmarysruthy

annmarysruthy made their first commit to this issue’s fork.

🇮🇳India annmarysruthy

In test #2: observed results are similar to that observed in test #1. Completed testing.

4. Unable to get response from ai when using CKEditor assistants "Story teller" created in test setup step 13. Already reported in the above comment https://www.drupal.org/project/ai/issues/3528446 🐛 AI Automators CKEditor plugin is broken Active and fixed.

summarize plugin from ckeditor module and summarize in content suggestions works perfectly.

5. successfully translated article node with ai translate.
6. On creating any new content/translation, the node is getting indexed.
7. was unable to create view in test setup. So Unable to test step 7.
8. Successfully created test automators by filling in only title field and long string generated from AI.
9. Obtained correct response from chatbot.
10,11,12,13: Visited the paths and no error observed
14,15,16,17: Visited the paths and no errors observed.
18, 19: No errors observed

🇮🇳India annmarysruthy

In Test #1:

4. Try to add an article with the CKEditor assistants tools and Content Suggestions.

Result: Unable to get response from ai when using CKEditor assistants "Story teller" created in test setup step 13. Story teller was working correctly before update. However summarize plugin from ckeditor module and summarize in content suggestions works perfectly. error in story teller automator chain:
InvalidArgumentException: Field selected_text is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 617 of /var/www/html/core/lib/Drupal/Core/Entity/ContentEntityBase.php).

5. successfully translated article node with ai translate.
6. On creating any new content/translation, the node is getting indexed.
7. was unable to create view in test setup. So Unable to test step 7.
8. Successfully created test automators by filling in only title field and long string generated from AI.
9. Response from chatbot:

The content types available on this Drupal instance are:

    Article
    Basic page
    Test Automators

10,11,12,13: Visited the paths and no error observed
14, 15: Unable to access the path. Fatal error:

The website encountered an unexpected error. Try again later.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "ai_agent" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of core/lib/Drupal/Core/Entity/EntityTypeManager.php). 

16,17: Visited the paths and no error observed
18, 19: No errors observed

🇮🇳India annmarysruthy

Checked the issue. added an article in english(original language). Created a german translation of a node.
All the below options have (all languages) span attached to it when content translation is enabled:

  1. Last saved
  2. Author
  3. Create new revision
  4. Revision log message
  5. However all these values are different for each translation. My suggestion is to change all the suffixes from (all languages) to (this translation) as in save button.

Tests should be updated to reflect the above change.

🇮🇳India annmarysruthy

After upgrading the AI module to 1.1.x-dev, Faced a fatal error:

Fatal error: Declaration of Drupal\ai_vdb_provider_milvus\Plugin\VdbProvider\MilvusProvider::vectorSearch(string $collection_name, array $vector_input, array $output_fields, mixed $filters = '', int $limit = 10, int $offset = 0, string $database = 'default'): array must be compatible with Drupal\ai\AiVdbProviderInterface::vectorSearch(string $collection_name, array $vector_input, array $output_fields, Drupal\search_api\Query\QueryInterface $query, string $filters = '', int $limit = 10, int $offset = 0, string $database = 'default'): array in /var/www/html/modules/contrib/ai_vdb_provider_milvus/src/Plugin/VdbProvider/MilvusProvider.php on line 597

This is mentioned in https://www.drupal.org/project/ai/issues/3515861 🐛 MilvusProvider.php on line 597 Active .

@marcus_johansson Kindly let me know the milvus db provider version to be used for testing. in test setup it is mentioned "Milvus Provider 1.0.2-beta2" . But there is no version 1.0.2-beta2 available. Currently I have used "1.0.0-beta2"

🇮🇳India annmarysruthy

Tried test setup. Assuming the Milvus Provider in step 2 is 1.0.0-beta2. Completed till step 16, On adding a new view with the index, got an error

The submitted value search_api_data in the output as element is not allowed.
The submitted value search_api_data in the Feed row style element is not allowed.

This might be related to core issue https://www.drupal.org/project/facets/issues/3446040 🐛 The submitted value [value] in the [name] element is not allowed. Active

🇮🇳India annmarysruthy

Tested the changes. After applying the MR and running drush updb, agent tool IDs are updated to the new double-colon format (ai_agents::ai_agent::{config_name}). Verified using:

ddev drush ev "\$defs = \Drupal::service('plugin.manager.ai.function_calls')->getDefinitions(); foreach (\$defs as \$id => \$def) { echo \$id . ': ' . (\$def['group'] ?? 'none') . ' / ' . (\$def['custom_type'] ?? 'none') . PHP_EOL; }"

Output before applying MR and running drush updb:

action_plugin:node_make_unsticky_action: drupal_actions / none
action_plugin:node_promote_action: drupal_actions / none
action_plugin:node_make_sticky_action: drupal_actions / none
action_plugin:node_unpromote_action: drupal_actions / none
action_plugin:user_unblock_user_action: drupal_actions / none
action_plugin:user_add_role_action: drupal_actions / none
action_plugin:user_block_user_action: drupal_actions / none
action_plugin:user_remove_role_action: drupal_actions / none
action_plugin:entity:save_action:block_content: drupal_actions / none
action_plugin:entity:save_action:comment: drupal_actions / none
action_plugin:entity:save_action:file: drupal_actions / none
action_plugin:entity:save_action:menu_link_content: drupal_actions / none
action_plugin:entity:save_action:node: drupal_actions / none
action_plugin:entity:save_action:taxonomy_term: drupal_actions / none
action_plugin:entity:save_action:user: drupal_actions / none
action_plugin:action_message_action: drupal_actions / none
action_plugin:action_goto_action: drupal_actions / none
action_plugin:entity:publish_action:block_content: drupal_actions / none
action_plugin:entity:publish_action:comment: drupal_actions / none
action_plugin:entity:publish_action:menu_link_content: drupal_actions / none
action_plugin:entity:publish_action:node: drupal_actions / none
action_plugin:entity:publish_action:path_alias: drupal_actions / none
action_plugin:entity:publish_action:taxonomy_term: drupal_actions / none
action_plugin:entity:unpublish_action:block_content: drupal_actions / none
action_plugin:entity:unpublish_action:comment: drupal_actions / none
action_plugin:entity:unpublish_action:menu_link_content: drupal_actions / none
action_plugin:entity:unpublish_action:node: drupal_actions / none
action_plugin:entity:unpublish_action:path_alias: drupal_actions / none
action_plugin:entity:unpublish_action:taxonomy_term: drupal_actions / none
action_plugin:action_send_email_action: drupal_actions / none
ai_agent:get_entity_type_field_storage: information_tools / none
ai_agent:list_config_entities: information_tools / none
ai_agent:get_field_display_form: information_tools / none
ai_agent:list_field_display_types: information_tools / none
ai_agent:edit_content_type: modification_tools / none
ai_agent:list_taxonomy_term: information_tools / none
ai_agent:content_entity_seeder: modification_tools / none
ai_agent:get_current_content_entity_values: information_tools / none
ai_agent:get_config_schema: information_tools / none
ai_agent:manipulate_field_config: modification_tools / none
ai_agent:get_entity_field_information: information_tools / none
ai_agent:get_field_values_and_context: information_tools / none
ai_agent:list_bundles: information_tools / none
ai_agent:get_field_storage_form: information_tools / none
ai_agent:content_entity_field_value: entity_tools / none
ai_agent:content_entity_field_values_list: entity_tools / none
ai_agent:create_agent_config_tools_enabled:  / none
ai_agent:vision: information_tools / none
ai_agent:modify_taxonomy_term: modification_tools / none
ai_agent:create_field_storage_config: modification_tools / none
ai_agent:get_field_config_form: information_tools / none
ai_agent:web_scraper: information_tools / none
ai_agent:list_field_types: information_tools / none
ai_agent:list_entity_types: information_tools / none
ai_agent:modify_bundle_type: modification_tools / none
ai_agent:get_field_storage: information_tools / none
ai_agent:list_content_entities: information_tools / none
ai_agent:get_field_config: information_tools / none
ai_agent:get_content_type_info: information_tools / none
ai_agent:manipulate_field_display_form: modification_tools / none
ai_agent:create_content_type: modification_tools / none
ai_agent:modify_vocabulary: modification_tools / none
ai_search:rag_search: information_tools / none
ai_agent:taxonomy_agent: agent_tools / none
ai_agent:node_content_type_agent: agent_tools / none
ai_agent:field_type_agent: agent_tools / none

Output after applying MR and running drush updb:

action_plugin:node_make_unsticky_action: drupal_actions / none
action_plugin:node_promote_action: drupal_actions / none
action_plugin:node_make_sticky_action: drupal_actions / none
action_plugin:node_unpromote_action: drupal_actions / none
action_plugin:user_unblock_user_action: drupal_actions / none
action_plugin:user_add_role_action: drupal_actions / none
action_plugin:user_block_user_action: drupal_actions / none
action_plugin:user_remove_role_action: drupal_actions / none
action_plugin:entity:save_action:block_content: drupal_actions / none
action_plugin:entity:save_action:comment: drupal_actions / none
action_plugin:entity:save_action:file: drupal_actions / none
action_plugin:entity:save_action:menu_link_content: drupal_actions / none
action_plugin:entity:save_action:node: drupal_actions / none
action_plugin:entity:save_action:taxonomy_term: drupal_actions / none
action_plugin:entity:save_action:user: drupal_actions / none
action_plugin:action_message_action: drupal_actions / none
action_plugin:action_goto_action: drupal_actions / none
action_plugin:entity:publish_action:block_content: drupal_actions / none
action_plugin:entity:publish_action:comment: drupal_actions / none
action_plugin:entity:publish_action:menu_link_content: drupal_actions / none
action_plugin:entity:publish_action:node: drupal_actions / none
action_plugin:entity:publish_action:path_alias: drupal_actions / none
action_plugin:entity:publish_action:taxonomy_term: drupal_actions / none
action_plugin:entity:unpublish_action:block_content: drupal_actions / none
action_plugin:entity:unpublish_action:comment: drupal_actions / none
action_plugin:entity:unpublish_action:menu_link_content: drupal_actions / none
action_plugin:entity:unpublish_action:node: drupal_actions / none
action_plugin:entity:unpublish_action:path_alias: drupal_actions / none
action_plugin:entity:unpublish_action:taxonomy_term: drupal_actions / none
action_plugin:action_send_email_action: drupal_actions / none
ai_agent:get_entity_type_field_storage: information_tools / none
ai_agent:list_config_entities: information_tools / none
ai_agent:get_field_display_form: information_tools / none
ai_agent:list_field_display_types: information_tools / none
ai_agent:edit_content_type: modification_tools / none
ai_agent:list_taxonomy_term: information_tools / none
ai_agent:content_entity_seeder: modification_tools / none
ai_agent:get_current_content_entity_values: information_tools / none
ai_agent:get_config_schema: information_tools / none
ai_agent:manipulate_field_config: modification_tools / none
ai_agent:get_entity_field_information: information_tools / none
ai_agent:get_field_values_and_context: information_tools / none
ai_agent:list_bundles: information_tools / none
ai_agent:get_field_storage_form: information_tools / none
ai_agent:content_entity_field_value: entity_tools / none
ai_agent:content_entity_field_values_list: entity_tools / none
ai_agent:create_agent_config_tools_enabled:  / none
ai_agent:vision: information_tools / none
ai_agent:modify_taxonomy_term: modification_tools / none
ai_agent:create_field_storage_config: modification_tools / none
ai_agent:get_field_config_form: information_tools / none
ai_agent:web_scraper: information_tools / none
ai_agent:list_field_types: information_tools / none
ai_agent:list_entity_types: information_tools / none
ai_agent:modify_bundle_type: modification_tools / none
ai_agent:get_field_storage: information_tools / none
ai_agent:list_content_entities: information_tools / none
ai_agent:get_field_config: information_tools / none
ai_agent:get_content_type_info: information_tools / none
ai_agent:manipulate_field_display_form: modification_tools / none
ai_agent:create_content_type: modification_tools / none
ai_agent:modify_vocabulary: modification_tools / none
ai_agents::ai_agent::taxonomy_agent: agent_tools / none
ai_agents::ai_agent::node_content_type_agent: agent_tools / none
ai_agents::ai_agent::field_type_agent: agent_tools / none
ai_agents::ai_agent::content_type_agent_triage: agent_tools / none
ai_agents::ai_agent::field_agent_triage: agent_tools / none
ai_agents::ai_agent::taxonomy_agent_config: agent_tools / none
🇮🇳India annmarysruthy

I’ve made a few updates to fix the missing triggerEvent() call:

  • Made $request_thread_id nullable in PostStreamingResponseEvent to avoid test failures.
  • Added a $eventTriggered flag in StreamedChatMessageIterator to prevent duplicate events.
  • Added null check in triggerEvent() and improved __destruct() for safety.
  • Introduced finishStreaming() method so providers can trigger the event explicitly (recommended over relying on __destruct()).

Kindly review.

🇮🇳India annmarysruthy

Reviewed the MR and tested the changes. Even after applying the changes, the Enable RAG checkbox will be disabled on each edit , if no agent is selected.

Kindly check again

🇮🇳India annmarysruthy

Reviewed the MR and tested the changes. The MR fixes the issue when adding ai assistant without ai_agent installed. @anjaliprasannan

🇮🇳India annmarysruthy

Hi @jhedstrom, Tried replicating the issue- Unable to replicate. Im using drupal 11 and ai module 1.1.x-dev. Used plugin "Generate with AI" and response was correctly formatted.

Could you please elaborate the steps/specify the ai module version.

🇮🇳India annmarysruthy

Followed the steps mentioned , installed ai agents 1.1.0-beta2 but unable to replicate the error. able to add new agent.

This might be environment-specific or related to a missing or misconfigured dependency. Might help if the reporter shares more details like core AI module version or any custom code involved.

🇮🇳India annmarysruthy

Reviewed the MR and tested the changes. Found an issue:

  • On changing the Default provider from a valid provider to 'No Default', the dropdown in 'Default model' changes is empty , instead of '-select-' being displayed
Production build 0.71.5 2024