Merge Requests

More

Recent comments

šŸ‡®šŸ‡³India prashant.c Dharamshala

Two YouTube channels are the official ones:

Drupal AI : https://www.youtube.com/@drupal_ai
FreelyGive: https://www.youtube.com/@FreelyGive

šŸ‡®šŸ‡³India prashant.c Dharamshala

@annmarysruthy, thanks for working on this.

Kindly address the review comments.

šŸ‡®šŸ‡³India prashant.c Dharamshala

These example were a much needed, thanks @bisonbleu.

šŸ‡®šŸ‡³India prashant.c Dharamshala

I tried the following:

1. drush ai "what is Drupal?" It is showing "Fetching response..." as a loader.
2. drush ai showing interactive input and shows "Fetching response..." as a loader.
3. drush aiby default works for chat only, is it supposed to work for ai:translate-entity ai:translate-text also?

šŸ‡®šŸ‡³India prashant.c Dharamshala

No, I do not see it, assuming in Trial account they do not provide the ability to use API key.

šŸ‡®šŸ‡³India prashant.c Dharamshala

I was about to report it, fortunately found this. This is across versions. Today, I encountered this on 1.2.x also.

šŸ‡®šŸ‡³India prashant.c Dharamshala

This one #3512100: Create DataType converter for complex data types is already fixed, but still there are different errors in logs for different tools we run.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Got the same error on the pageadmin/config/ai/explorers/tools_explorer.

Will something like the following work:

    if (!empty($attributes)) {
      return $attributes[0]->newInstance()->id;
    }
    return $type;
šŸ‡®šŸ‡³India prashant.c Dharamshala

I can think of some use cases of multiple chatbots on the same page, like one for FAQs, another for form filling, etc. Currently it does not work, butit would be a great addition to AI assistants. However not sure about the challenges for the same.

šŸ‡®šŸ‡³India prashant.c Dharamshala

In the case of "AI Balloon Menu," which is just an extension of the "AI CKeditor" plugin, therefore, to use the balloon menu, one needs to enable the AI CKeditor plugin, which holds the configurations.

For more details, you can go through the original issue: https://www.drupal.org/project/ai/issues/3516116#comment-16059058 ✨ Make "AI Assistant" functionality available through contextual (baloon) menu Active

Hope this helps.

Thankyou

šŸ‡®šŸ‡³India prashant.c Dharamshala

Raised the MR against 1.2.x, sorry, I had kind of messed up with 3479913-move-the-external MR by merging it with 1.2.x.

Thanks

šŸ‡®šŸ‡³India prashant.c Dharamshala

prashant.c → changed the visibility of the branch 3479913-move-the-external to hidden.

šŸ‡®šŸ‡³India prashant.c Dharamshala

prashant.c → made their first commit to this issue’s fork.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Thanks, overall working well.

A few suggestions left on the MR, please check.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Overall, a great feature to have, working fine. Left a couple of MR comments.

šŸ‡®šŸ‡³India prashant.c Dharamshala

@ronttizz

Thanks for raising this.

Could you please also specify the Drupal core version you are using, it will help replicating the issue?

šŸ‡®šŸ‡³India prashant.c Dharamshala

@marcus_johansson

I have a few queries:

Are we supposed to use the https://www.drupal.org/project/ai_provider_dreamstudio → as a provider for this?
I created an account on https://dreamstudio.stability.ai/ and a trial one, do not see any link or way to get the API key.

Could you please guide me here?

Thankyou

šŸ‡®šŸ‡³India prashant.c Dharamshala

Just to make sure that we do not have this error on 1.2.x of AI and 1.2.x of AI agents, tried replicating with Drupal core 11.x, all pages are working fine without any error, etc.

Seems to be specific to Drupal core 10 and Drupal AI 1.1.0, as mentioned in the Steps to reproduce.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Yes, this would help the users (devs and others) to find out and contact maintainers based on the responsibility and part of the module they are maintaining.

šŸ‡®šŸ‡³India prashant.c Dharamshala

I think currently, this can't be worked upon until we do the related one. Kindly suggest.

šŸ‡®šŸ‡³India prashant.c Dharamshala

I was also able to replicate while moving from 1.1.x to 1.2.x. MR seems fine, please do a rebase and should be good to go in my opinion.

šŸ‡®šŸ‡³India prashant.c Dharamshala

We can check if this one is related to https://www.drupal.org/project/ai/issues/3529802 ✨ Don't hardcode 'value' key for textual field translation Active

šŸ‡®šŸ‡³India prashant.c Dharamshala

Along with this, it could be helpful if the table https://project.pages.drupalcode.org/ai/providers/matris/ could be added to the AI project page itself to directly see which provider is supporting which model.

šŸ‡®šŸ‡³India prashant.c Dharamshala

@marcus_johansson

We can include Enable AI content suggestions only for chosen content types → and "Ask AI" button breaks UI when using streamed output in AI Explorers šŸ› "Ask AI" button breaks UI when using streamed output in AI Explorers Active , if it seems valid to you.

Thanks

šŸ‡®šŸ‡³India prashant.c Dharamshala

Tried reviewing, posted a couple of comments on the MR.

šŸ‡®šŸ‡³India prashant.c Dharamshala

On a 1.0.0 release it could be ~1.0 From 1.0.0 up to but not 1.1.0
On a 1.1.0 release it could be ^1.1From 1.1.0 to less than 2.0.0

šŸ‡®šŸ‡³India prashant.c Dharamshala

prashant.c → changed the visibility of the branch 1.2.x to hidden.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Please ignore the comments on the PR. For reference, we need something like the following:

Please change the wording from Bundles to "Content types".

šŸ‡®šŸ‡³India prashant.c Dharamshala

Thanks for working on this. Kindly address the feedback and try to share the screenshots as well for how it looks in the UI.

šŸ‡®šŸ‡³India prashant.c Dharamshala

As per https://drupal.slack.com/archives/C0803LX4536/p1749027235911549?thread_t... , tried with the "Stream" as unchecked, it works as expected.

Could not replicate this https://www.drupal.org/project/ai/issues/3526074 šŸ› Deepchat response not displayed until page reload when stream option is enabled Active as the response appeared for me immediately without a page reload.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Due to the fatal error issue, changing the status to NW.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Similar to the https://www.drupal.org/project/ai_agents/issues/3516448 šŸ› Fatal Error on enabling Active but steps to reproduce are different i.e occurring on Assistants.

šŸ‡®šŸ‡³India prashant.c Dharamshala

I think it would be better if Marcus could confirm whether the placeholders not implemented for advanced mode are done on purpose or missed.

šŸ‡®šŸ‡³India prashant.c Dharamshala

This needs to be addressed for all the explorer types available.

šŸ‡®šŸ‡³India prashant.c Dharamshala

You may try adding WebP to this and see whether the model supports it or not. If it is, then you may add webp to the allowed extensions list.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Reviewed the MR and left a feedback to be addressed.

Additionally @kanchan bhogade tried to upload a PNG which we is not allowed and should have given a validation message. PNG is also a very common image extension, should we consider allowing it also?

šŸ‡®šŸ‡³India prashant.c Dharamshala

Added the code to have the "Placeholders available" section for the Advanced mode. Needs to be reviewed.

šŸ‡®šŸ‡³India prashant.c Dharamshala

prashant.c → made their first commit to this issue’s fork.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Is this related to this https://www.drupal.org/project/ai/issues/3525025 šŸ› Missing button on Ai Explorer for Speech to Speech Active or different?

šŸ‡®šŸ‡³India prashant.c Dharamshala

I suggest not displaying the link to the explorer in the explorers' listing at all if the currently configured provider(s) do not support an operation. If that is already working, then we do not need to do anything in this, I guess.

šŸ‡®šŸ‡³India prashant.c Dharamshala

@anjaliprasannan

It would be helpful to add more details to the steps to reproduce, possibly with a screenshot. Regarding the allowed extensions, as far as I know, the field extension might be hardcoded.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Rebased, moving back to NR, in case I missed something.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Not sure why it was kind of markdown code with ```html , the changes fixes the issue. A rebase was needed which is done. Requesting maintainers to review.

šŸ‡®šŸ‡³India prashant.c Dharamshala

prashant.c → made their first commit to this issue’s fork.

šŸ‡®šŸ‡³India prashant.c Dharamshala

The following warning seems unrelated to the current MR :

1. Ai Search Setup My Sql (Drupal\Tests\ai_search\Functional\AiSearchSetupMySql)
⚠ Field indexing options
✘ Search view
┐
ā”œ Exception: Warning: Undefined array key "title"
ā”œ Drupal\views\Views::fetchPluginNames()() (Line: 157)

Kindly rebase and move it to NR.

šŸ‡®šŸ‡³India prashant.c Dharamshala

@anjaliprasannan

You screenshot shows "Translate using gtp-4o" but try to check when neither provider nor model is set.

šŸ‡®šŸ‡³India prashant.c Dharamshala

@jonnytoomey

I could not replicate this issue. I believe there could be some custom javascript code or library that you might be using which is trying to find the element which is not visible on the page hence throwing this error in browser console.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Steps to reproduce would help here.

šŸ‡®šŸ‡³India prashant.c Dharamshala

@ishani

You may try to add a validation message in this case when the provider and model are not set for the translation, and the user tries to translate by clicking the "AI Translations" link/button.

šŸ‡®šŸ‡³India prashant.c Dharamshala

@anjaliprasannan, if you could address the review feedback points, that would be great.

šŸ‡®šŸ‡³India prashant.c Dharamshala

@_randy

Could you please add more details to the steps to reproduce, like which version of Drupal core is a dev version, like (11.x) or 11.1 or 11.2, etc, that will help replicate the issue?

šŸ‡®šŸ‡³India prashant.c Dharamshala

@marcus_johansson I am not able to replicate this atleast on 1.1.x.

šŸ‡®šŸ‡³India prashant.c Dharamshala

A couple of points that need to be addressed:

1. Ai Search Setup My Sql (Drupal\Tests\ai_search\Functional\AiSearchSetupMySql)
⚠ Field indexing options
✘ Search view
┐
ā”œ Exception: Warning: Undefined array key "title"
ā”œ Drupal\views\Views::fetchPluginNames()() (Line: 157)

2. "Choose Model" should not appear when there is no provider available in the "Default Provider" select list for example in Image classification operation type

šŸ‡®šŸ‡³India prashant.c Dharamshala
šŸ‡®šŸ‡³India prashant.c Dharamshala

Did not work for me.

1. I have 2 vocabularies Tags and Test
2. Tags has no terms
3. Test has 1 term
4. It is not listing any of these, in addition to that "Use source vocabulary" also disappeared after switching to the MR branch.

It needs work.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Left some review comments, moving to NW. Kindly address those and move back to NR.

šŸ‡®šŸ‡³India prashant.c Dharamshala

On the page /admin/config/ai/settings getting the following error:

Fatal error: Class Drupal\ai\OperationType\DocumentToText\DocumentToTextInput contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (Drupal\ai\OperationType\InputInterface::getDebugData, Drupal\ai\OperationType\InputInterface::setDebugData, Drupal\ai\OperationType\InputInterface::setDebugDataValue) in /var/www/html/modules/contrib/ai/src/OperationType/DocumentToText/DocumentToTextInput.php on line 11

šŸ‡®šŸ‡³India prashant.c Dharamshala

Thanks for the great work done @joevagyok on this but there is no activity from last 6 months changing the assignee to unassigned.

šŸ‡®šŸ‡³India prashant.c Dharamshala

@marcus

I have done the following:

šŸ‡®šŸ‡³India prashant.c Dharamshala

prashant.c → made their first commit to this issue’s fork.

šŸ‡®šŸ‡³India prashant.c Dharamshala

@ishani

I tried it on 1.1.x of ai and without even entering anything in these fields i got some response data. In addition to this also got the validation message but the form still got submitted it seems.

šŸ‡®šŸ‡³India prashant.c Dharamshala

With the help of an AI code assistant attempted the solution, which does the following:

  • Created a base plugin class (OperationTypePluginBase) that implements the OperationTypeInterface
  • Created a custom discovery class (OperationTypeDiscovery) that:
  • Discovers interfaces in the OperationType directory
  • Creates corresponding plugin class names
  • Maintains the existing interface structure
  • Works with the new attribute discovery system
  • Updates the AiProviderPluginManager to use the discovery system

Possible benefits of this approach:

  • Maintains backward compatibility - existing code using interfaces continues to work
  • Works with the new attribute discovery system
  • Doesn't require moving or restructuring existing interfaces
  • This could be replaced/rewritten when a proper plugin system for operation types is in place going forward
  • Now discover operation types from interfaces

Needs a thorough review of the code.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Need phpcs fixes to let the pipelines pass and it should be good to go.

šŸ‡®šŸ‡³India prashant.c Dharamshala

I tried multiple tweaks, but nothing worked. I think the operation types are not getting discovered because they are not plugins.

Can we go with the approach of 1.0.x:where it is working fine

https://git.drupalcode.org/project/ai/-/blob/1.0.x/src/AiProviderPluginM...

šŸ‡®šŸ‡³India prashant.c Dharamshala

Raised the MR against 1.1.xby fixing the logic to handle the Ajax loading of models per provider. Changes need to be reviewed.

šŸ‡®šŸ‡³India prashant.c Dharamshala

prashant.c → made their first commit to this issue’s fork.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Different regions on the same page make sense, but what if both blocks are placed on different paths?

In case the response block is not on the same page, there are errors throw,n and the user/admin does not know whether it is working or not

šŸ‡®šŸ‡³India prashant.c Dharamshala

Thank you, @dcam, maybe I misunderstood the issue, so now hyphens are allowed whereas underscores are not.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Yes, I was just going through the files in core/lib/Drupal/Core/Config/Checkpoint. You are correct, the underlying API does not provide a way to change the label. Then, in that case, you may close this issue.

Thanks

šŸ‡®šŸ‡³India prashant.c Dharamshala

Will try to add test coverage, if hyphen(-) is used in the machine name, it will get replaced by underscore(_).

šŸ‡®šŸ‡³India prashant.c Dharamshala

For this we only need to replace -with _in the replace_patternand replacekeys of the machine_nameelement.
This will allow lowercase letters, numbers, and underscores, and the "replace" key will replace other special characters with _.

Please review.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Thank you @jrockowitz. This is extremely helpful to have these listed at one place.

šŸ‡®šŸ‡³India prashant.c Dharamshala

Not sure, but this https://www.drupal.org/project/ai/issues/3519196 šŸ› Handle errors for API explorers when a provider not configured Active might be related.

šŸ‡®šŸ‡³India prashant.c Dharamshala

The search module does not yet have any functional JavaScript tests. So, this is the only file for it. However, the search module has another test type, functional, kernel, and unit, where this won't fit AFAIK.

Production build 0.71.5 2024