🇮🇳India @anjaliprasannan

Account created on 3 February 2020, over 5 years ago
  • Drupal Developer at QED42 
#

Recent comments

🇮🇳India anjaliprasannan

This is working as designed.
You need to add the translation for “Load service chatbot Deepchat (uses session cookie and sends data to external service)?” in /admin/config/regional/translate and it gets translated.

🇮🇳India anjaliprasannan

Retested and found no issues other than those reported above.

🇮🇳India anjaliprasannan

I have reviewed the fix, its working fine.
test scenerio:
Followed the steps to reproduce and added a logger in \Drupal\ai\OperationType\Chat\StreamedChatMessageIterator::triggerEvent

\Drupal\ai\OperationType\Chat\StreamedChatMessageIterator::triggerEvent was triggered.

🇮🇳India anjaliprasannan

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

🇮🇳India anjaliprasannan

The issue exist and fix is fine. Hence moveing to RTBC

🇮🇳India anjaliprasannan

The fix is working fine. Moving to RTBC
Steps followed:
Created folder recipes/ai_translate with file recipe.yml file in root.

name: 'AI Translate'
description: 'Enables AI-powered content translation'
type: 'Feature'

install:
  - ai_translate

configured translate text in ai default settings and try to translate any content
Translate using ... option available.

Screeshots attached.

🇮🇳India anjaliprasannan

anjaliprasannan changed the visibility of the branch 1.1.x to hidden.

🇮🇳India anjaliprasannan

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

🇮🇳India anjaliprasannan

Fix works fine. Attaching the before and after fix ss.

🇮🇳India anjaliprasannan

Before moving forward with the fix, I want to confirm if the RAG Search dependency on agent selection in AiAssistantForm expected behavior?

In this code

if ($form_state->get('agents_enabled') || $form_state->getValue('ai_agent')) {
  // ... other agent logic ...
  if ($form_state->getValue('enable_rag')) {
    $tools['ai_search:rag_search'] = TRUE;
    $tool_usage_limits['ai_search:rag_search'] = [
      // RAG settings
    ];
  }
}

RAG functionality is only applied when: The ai_agents module is enabled and an ai_agent is selected in the "Use agent as assistant" field. As a result, if no agent is selected or the ai_agents module is disabled, enabling the "Enable RAG" checkbox and configuring RAG settings has no effect, as the ai_search:rag_search tool is not added to tools or tool_usage_limits. Is this dependency on agent selection the expected behavior for RAG functionality? Or should RAG be available independently when the ai_search module is enabled and the "Enable RAG" checkbox is checked?

If so, I’m considering moving the RAG logic outside the agent condition, placing it within the existing if ($this->moduleHandler->moduleExists('ai_search')) block in submitForm. This would allow RAG to function independently of agent selection.

🇮🇳India anjaliprasannan

Reviewed the fix and it works fine. Keeping in Needs review for code review. Attaching before and after screencast

🇮🇳India anjaliprasannan

I have reviewed fix and working fine. Code looks good. Hence moving to RTBC.

🇮🇳India anjaliprasannan

@sarvjeetsingh Once you have ai_agents and ai in 1.1.x you can reproduce this issue.

🇮🇳India anjaliprasannan

I have reviewed the fix. It works fine. Moving to RTBC

🇮🇳India anjaliprasannan

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

🇮🇳India anjaliprasannan

@svendecabooter Changed the target branch and updated the code.

🇮🇳India anjaliprasannan

I wanted to confirm before applying the fix.
Changes that I plan to do are:

  • Update the ai_agents.module file to change the format of agent tool IDs from ai_agent:{config_name} to ai_agents::ai_agent::{config_name}.
  • Create an update hook ai_agents_update_9001() in ai_agents.install that: Loads all AI agent entities
  • For each entity, update the tool IDs in the tools array to use the new double colon format

If this fix is correct I can continue creating the MR.

🇮🇳India anjaliprasannan

Please review the fix and suggest if further changes are required.

🇮🇳India anjaliprasannan

anjaliprasannan changed the visibility of the branch 3524435-add-token-usage to hidden.

🇮🇳India anjaliprasannan

I can see there's an inconsistency in the package naming. The directory name and README use ai_agents_chatbot_evaluation_recipe (without 's'), but the composer.json file uses ai_agents_chatbot_evaluations_recipe (with 's').

🇮🇳India anjaliprasannan

Yes @Prabha I checked after #3526029 and the issue is not found now. Closing the ticket hence.

🇮🇳India anjaliprasannan

anjaliprasannan changed the visibility of the branch 3525914-clearly-explain-ai to hidden.

🇮🇳India anjaliprasannan

anjaliprasannan changed the visibility of the branch 3525914-clearly-explain-ai to active.

🇮🇳India anjaliprasannan

anjaliprasannan changed the visibility of the branch 3525914-clearly-explain-ai to hidden.

🇮🇳India anjaliprasannan

@damienmckenna I have done changes as per my understandings. Please review.

🇮🇳India anjaliprasannan

Please review once #3526029 is merged.

🇮🇳India anjaliprasannan

Added steps to use ai powered search in chatbot.

🇮🇳India anjaliprasannan

anjaliprasannan changed the visibility of the branch 3525914-clearly-explain-ai to hidden.

🇮🇳India anjaliprasannan

I have added the fix similar to Chatgenerator Explorer to all the other explorers.

Tested for the below explorer and the console error is not thrown after applying the fix.

  • Chatgenerator Explorer
  • Embeddings Generation Explorer
  • Image Classification Explorer
  • Moderation Explorer
  • Speech-To-Text Generation Explorer
  • Text-To-Image Generation Explorer
  • Text-To-Speech Generation Explorer
  • Tools Explorer

Please test for the remaining explorers.

  • Audio-To-Audio Explorer
  • Image-and-Audio-to-Video Explorer
  • Speech-To-Speech Explorer

Also please do a thorough code review and suggest if any changes are required.

🇮🇳India anjaliprasannan

anjaliprasannan changed the visibility of the branch 3525914-clearly-explain-ai to hidden.

🇮🇳India anjaliprasannan

Hi @Kanchan Please checkin to this branch and review the MR. I checked it again and had no issues. The changes are working. Attaching the ss.

🇮🇳India anjaliprasannan

@gxleano, @vivek panicker I have faced this issue previously and when I changed the prompt with an additional instruction like "You are a looping agent that can first search and try to find information and then answer.
When you use the RAG tool, make sure that you only search for 5 items, unless the query is very complex. If you need to do multiple searches, you can trigger them all in the same go."

I was getting proper results. Can you try this from your end?

🇮🇳India anjaliprasannan

@Prashant I have checked again I have not set the provider and model for translation in default settings. This Translate using gtp-4o appears without setting the model. but when you click on Translate using gtp-4o I am getting the error page and once I come back to the translation page I can see the error prompt in the above screenshot. Hence we will have to make error message (Please set a default provider & model for the text translation the AI module settings.) appear before the batchprocess is called.

🇮🇳India anjaliprasannan

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

🇮🇳India anjaliprasannan

@prashant.c I have checked and there already exist a validation message when the provider and model are not set for the translation, and the user tries to translate by clicking the "AI Translations" link/button.

SS attached.

🇮🇳India anjaliprasannan

anjaliprasannan changed the visibility of the branch 3521839-console-errors-after to hidden.

🇮🇳India anjaliprasannan

@marcus_johansson this issue is replicated in 1.0.x

🇮🇳India anjaliprasannan

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

🇮🇳India anjaliprasannan

Keeping the mMR in draft as there is further work to be done.

🇮🇳India anjaliprasannan

Yes, This is correct. It would be better to use 2 different icons for ai ckeditor and ai baloon menu.

🇮🇳India anjaliprasannan

I tried installing the ai module 1.1.0 - beta version and did not get the above error in the status report.
Can you elaborate on the steps to reproduce?

🇮🇳India anjaliprasannan

@dudeweb The issue is not reproducible.
Steps I followed:

  • Enable translation for content in admin/config/regional/content-language
  • Enable Ai translation module and enable content translation in admin/config/ai/ai-translate
  • Choose default provider for Translate Text in admin/config/ai/settings
  • Try translating content using Translate ai option in content edit.

Content is translated.

Please provide more detailed steps to reproduce.

🇮🇳India anjaliprasannan

@ishani patel the issue exist in 1.0.x and the fix works well.

Moving to RTBC

🇮🇳India anjaliprasannan

@marcus_johansson I have modified the code now, can you review it?

Production build 0.71.5 2024