Account created on 4 July 2008, over 16 years ago
#

Merge Requests

Recent comments

🇱🇹Lithuania mindaugasd

Or 90% right?
Primary value of this is magic experience to the user. And primary user of this is non-technical user.

🇱🇹Lithuania mindaugasd

By default guzzle use https://curl.se/, but for streaming it use PHP native streaming wrappers https://www.php.net/manual/en/wrappers.php, which has limited functionality and proxied requests, AI just said to me, it is not supported.
Example issue on Github: https://github.com/guzzle/guzzle/issues/2616

🇱🇹Lithuania mindaugasd

If you really configured proxy, another thing to try -> turn off streaming feature.

Streaming may not be supported by proxy.

It is limitation of guzzle and/or PHP.

🇱🇹Lithuania mindaugasd

Hi @olegiv,

based on "Steps to reproduce" - proxy should already work if it is configured.

Observe that the setup fails because the test request is not routed through the configured proxy.

How did you configure it?

Here I pushed a code change which plugged Drupal HTTP client to OpenAI library.

So that middleware could be used, which enables change or log anything about HTTP request.

So with OpenAI you can already setup proxy by writing some middleware code:
* https://docs.guzzlephp.org/en/stable/request-options.html#proxy

Or setup in other way (depending how you did it), maybe some modules exists for that?

BUT for all other providers (Anthropic etc.) you have to study case by case how the request is made in code, and if it does not use Drupal HTTP client, change to use it if possible (maybe push merge request like I did). Let me know what you find.

🇱🇹Lithuania mindaugasd

More issues by @wouters_f

🇱🇹Lithuania mindaugasd

@wouters_f its utilities module and also by FreelyGive.

🇱🇹Lithuania mindaugasd

1. Added new modules to the list:
https://www.drupal.org/project/copilot
https://www.drupal.org/project/feedback_ai
https://www.drupal.org/project/aitxt
https://www.drupal.org/project/survey_ai
https://www.drupal.org/project/azure_ai_translator
https://www.drupal.org/project/ai_automator_pixabay
https://www.drupal.org/project/simple_crawler
https://www.drupal.org/project/ai_automator_extractor
https://www.drupal.org/project/google_places
https://www.drupal.org/project/scrapingbot
https://www.drupal.org/project/convertapi
https://www.drupal.org/project/ai_knowledge_graph
https://www.drupal.org/project/deepgram
https://www.drupal.org/project/elevenlabs
https://drupal.org/project/vais
https://www.drupal.org/project/ia_translations
https://www.drupal.org/project/ai_validations
https://www.drupal.org/project/ai_translate
https://www.drupal.org/project/ai_ckeditor
https://www.drupal.org/project/ai_content
https://www.drupal.org/project/ai_reporter
https://www.drupal.org/project/gemini_provider
https://www.drupal.org/project/ai_reporter
https://www.drupal.org/project/ai_image_generation
https://www.drupal.org/project/ai_automator_google_vision
https://www.drupal.org/project/gutenberg_ai_tools
https://www.drupal.org/project/ai_agents
https://www.drupal.org/project/ai_seo
https://www.drupal.org/project/voice_recognition_search
https://www.drupal.org/project/search_api_aais
https://www.drupal.org/project/vision
https://www.drupal.org/project/google_cloud_vision
https://www.drupal.org/project/google_vision

2. Created section "Integrated with AI module" and moved some modules there.

3. Created "Deprecated" section and moved some modules there.

4. Created issue #3464667: [META] Merging modules with AI mega module or depend on it and filled with related issues.

🇱🇹Lithuania mindaugasd

This module is most amazing example of super high value provided with comparatively little donations.

🇱🇹Lithuania mindaugasd

Updated AI module description with "AI search", as this is new feature of the module in the latest release. And so, added more stars for "Talking with content" category.

🇱🇹Lithuania mindaugasd

beyond the scope of this issue

Could be a separate issue, to expand this:

public function translateContent(string $input_text, $langFrom, $langTo)

and the places where it is used.

🇱🇹Lithuania mindaugasd

having complex conditions

This is good idea - it could be twig conditions by providing more variables for the same textarea like this:

  • {{ entity_type }}
  • {{ bundle }}
  • {{ fieldname }}

Maybe this would allow to fine-tune the prompt for any situation even like:
(ai_translate) One click translations for Paragraphs Needs review
?

🇱🇹Lithuania mindaugasd

"Reusable entity" by itself does not solve this and would not add this flexibility alone, because it is unclear where and how it would be integrated. Issue [META] Create a reusable "Prompt Entity" and field Active does not talk about how to actually integrate it to everywhere.

🇱🇹Lithuania mindaugasd

Done:

  • Segment "Header" configuration
  • Checkbox "Show header even if segment produce no output"
🇱🇹Lithuania mindaugasd

Title change, reducing the scope to "header" only.

🇱🇹Lithuania mindaugasd

Added new proposed solution "Submit whole form with ajax" to the description.

🇱🇹Lithuania mindaugasd

Updated the description with status.

🇱🇹Lithuania mindaugasd

Tried to do Add segment row enable/disable actions for segments table Active with ajax, but failed.

Reducing the priority of this issue, because this is complex, time consuming and error prone to do.

🇱🇹Lithuania mindaugasd

Increasing priority to normal, because feature is also useful for Inheriting segments of parent prompt in user interface Active allowing to disable inherited segments without overriding their settings.

🇱🇹Lithuania mindaugasd

Another part of equation is not only simple, but flexible, enabling 'ambitious site builders'.

🇱🇹Lithuania mindaugasd

three out of the four use cases in the document would definitely not describe themselves as marketers

I liked the marketer focus, because it is simple and most common. And even if I am not a marketer, I would like Drupal to be as simple to use, as if I was one.
If Drupal is simple for marketers, it is simple for everyone and all benefit.

🇱🇹Lithuania mindaugasd

I started using Gutenberg with AI almost 2 years ago :-) and still do (legacy app).

It just that Gutenberg has nice markup behind the scenes, easy to embed elements to.

For example:

<!-- wp:columns -->
<div class="wp-block-columns">
<!-- wp:column {"className":"ai-image"} -->
<div class="wp-block-column ai-image"><!-- wp:drupalmedia/drupal-media-entity {"mediaEntityIds":["313"],"viewMode":"content"} /--></div>
<!-- /wp:column -->
<!-- wp:column {"className":"ai-image"} -->
<div class="wp-block-column ai-image"><!-- wp:drupalmedia/drupal-media-entity {"mediaEntityIds":["314"],"viewMode":"content"} /--></div>
<!-- /wp:column -->
<!-- wp:column {"className":"ai-image"} -->
<div class="wp-block-column ai-image"><!-- wp:drupalmedia/drupal-media-entity {"mediaEntityIds":["315"],"viewMode":"content"} /--></div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->

I don't know how it is useful for you now, but still was very simple to work with.

🇱🇹Lithuania mindaugasd

Added 'proposed resolution' to issue description.

🇱🇹Lithuania mindaugasd

Added proposed solutions to the description. Already tried first one (ajax), but did not work.

🇱🇹Lithuania mindaugasd

- example prompts for people to use

Below each prompt setting, documentation could expand with various examples relating to that particular context.
Again a bit similar like #3466061-15: Can't modify prompt for translating

🇱🇹Lithuania mindaugasd

Would be the same as in 💬 Can't modify prompt for translating Needs review
Having a settings page is good optimal solution, unless there is some drawbacks? What are benefits of having a separate entity?

🇱🇹Lithuania mindaugasd

@wouters_f docs how to use?

🇱🇹Lithuania mindaugasd

https://www.drupal.org/docs/develop/theming-drupal/twig-in-drupal documentation is worse than no documentation in this context, this needs a cheat sheet like documentation for a quick glance of what is the syntax, in particular, how to write "IF" statement.

I made a quick search what is available, but even https://twig.symfony.com/ don't tell how to do it.

So let's use Marcus example (but Marcus also wrote syntax wrong [META] Create a reusable "Prompt Entity" and field Active ).

Could be changed:

Twig usage example:

{% if source_lang == 'sv' and dest_lang == 'en' %}
   Take the following text and translate it from Swedish to German word by word. Make sure that you try to understand from context if the person be spoken to are in a position where they are allowed to say du, otherwise change this to sie:
  {{ text }}
{% else %}
   Take the following text and translate it from {{ source_lang }} to {{ dest_lang }} word by word.
   {{ text }}
{% endif %}

Find more about Twig syntax here: https://twig.symfony.com/

Also maybe it is best to change variable names like in this Marcus example, because they are simpler.

🇱🇹Lithuania mindaugasd

Ajax on the entity form is hard, battling it for days lately: Add segment row enable/disable actions for segments table Active
Final solution - will do this without ajax and call it a day (or multiple:) to proceed building inheritance feature.

🇱🇹Lithuania mindaugasd

Added ai_translate.settings simple config object

Optimal solution.

suggestion to use Twig for prompts :)

Next best thing.

It would also be great to add link to twig documentation how to use it.

Visual editing, inheritance and so on of prompts is great, but

Biggest of those things that prompt segments are plugins which compute data. Will be easier to get it at some point later.

🇱🇹Lithuania mindaugasd

🩵 I love that one will need to write less code to use Drupal.

AI-powered tools that simplify creating content types, Drupal Views, and other site elements for everyone

Drupal site building features are quite simple already, and now more simple when ever.
But if someone is learning Drupal for the first time, maybe some things like "views arguments" or "views relationships" could be explained by AI or helped with.

Competing no-code solutions today enables to generate websites quick from answering few AI's questions. Maybe various AI experiments of automating site building (already in development by multiple people), can also help to generate websites quick to compete with this.

Also, emerging Drupal AI capabilities will help marketers in many other ways beyond (some examples https://workflows-of-ai.com/)

web designers to build and manage websites independently, without relying on developers

Include "Site builders without relying on web designers" in the strategy? Because design is difficult, more difficult when coding (especially coding with AI help).

Improve the ability to create themes and templates

There should be a lot more themes to choose from in the project browser. This is huuge pain point. "Experience builder" will address some of this problem, but themes are still quite non existant in Drupal.

One idea is to showcase "Sub-themes that depend on this theme" like I described more here #3241544-7: Add filter by project dependencies (ecosystem) making themes more extendable, dicoverable, used and maybe encouraging people to share their sub-themes.

🇱🇹Lithuania mindaugasd

There are many paths:

  1. If someone needs it, as suggested here #3466061-8: Can't modify prompt for translating , it won't be difficult to do edit it with little custom code.
  2. If there is even more need in specific areas, then AI module can simply expose a text-area to edit the prompt.
  3. If there is super urgent need and can't wait, then yes, AI module could have config entity now.

I'm afraid we're over-engineering the starting point.

I am developing assistants in custom code for 1.5 years. It does not feel like over-engineering to me, but as next iteration and putting things together for open source as flexible module I would like to use. I often talk how I love 'views' module for 'ambitious site builders', so I want Drupal to have more modules like it allowing to build a lot with little coding. So this prompt engineering tool is like a views module with quite many possibilities. I think its good that open release have flexible architecture from the start.

🇱🇹Lithuania mindaugasd

Of AI prompt engineering module, therefore, enabling someone who needs it, to customize prompt programatically.

🇱🇹Lithuania mindaugasd

Partly did 1st step, which is working improvement.

🇱🇹Lithuania mindaugasd

On next module release, in your example programmatic integration will be like this:

$storage = \Drupal::entityTypeManager()->getStorage('aiprompt');

$prompt = $storage->load('[enter_prompt_id]');
$prompt->setArgument('user_input', $user_input);

$prompt_string = $prompt->toString();

And within prompt text there will be a token:

text text text
  [prompt-args:user_input]
more text
🇱🇹Lithuania mindaugasd

Another idea:

Assuming, aiprompt module would grow to be used for providing default prompts, then structure could be changed:

  1. AI prompt - module would provide configuration entity out-of-the-box allowing to provide default prompts.
  2. AI prompt content - this module would provide additional content entity for advanced needs.
🇱🇹Lithuania mindaugasd

Drupal 11 has new "default content" feature which is part of "recipes" package, maybe it could be (effectively?) adopted.

🇱🇹Lithuania mindaugasd

We can provide default starting prompt instead of hard-coding it in the module

The prompt can have revisions turned on

If they are config entities

As 'content' or 'config' entities?

I plan to have hundreds of prompts myself utilizing Inheriting segments of parent prompt in user interface Active feature. So for me, prompt is a 'content' entity.
But to provide default, best to have 'config'.

aiprompt module at the moment have both 'content' and 'config'.

🇱🇹Lithuania mindaugasd

Done a lot of inheriting feature, next step is creating ability to override defaults and addressing all possible situations related to it (for example, if parent gets deleted etc)

🇱🇹Lithuania mindaugasd

Done mostly in this commit https://git.drupalcode.org/project/aiprompt/-/commit/0d56d662c2e2bc6f3a7...
but not yet this part:

If "Administrative notes" is filled, then derive label from it

🇱🇹Lithuania mindaugasd

Example case Prompt library in the popup modal Active , where tokens don't need to be processed by the prompt entity.

🇱🇹Lithuania mindaugasd

I seen videos how new features of AI module module work (will be released on Monday),
I think it would be useful to select a prompt within various contexts from the prompt library: Prompt library in the popup modal Active

🇱🇹Lithuania mindaugasd

Method can be used for this

protected function configurationReplaceTokens(array $config): array
🇱🇹Lithuania mindaugasd

In latest commit done this:

  • Provide tokens generated from arguments.
🇱🇹Lithuania mindaugasd

I am relating core issue where functionality to support tokens of multiple entities of the same type is being built Support multiple instances of the same token type in token replacement Needs review

Also, in the meantime, there is a contrib module built https://www.drupal.org/project/token_aliases enabling this functionality.

🇱🇹Lithuania mindaugasd

@JurriaanRoelofs good ideas, relates to this issue: 🌱 Project/issue nodes are knowledge that can be graphed Active

Current situation is:

  • I hear that SQL databases are slowly releasing native features for vectors/RAG, but don't follow the details of this (yet)
  • FreelyGive team have built working demo vectorizing project browser and assistant http://project-browser.freelygive.io/ (Source code https://gitlab.com/freelygive/demos/module-bot)
  • AI module https://drupal.org/project/ai have build many AI search features this month, and during next month I hear this will be developed further. Team includes people who worked on all previous solutions, so this is next version already.
  • Next week I will explore project browser demo myself and ways to improve. In general, improving project browser demo to a high level (a common feature we all have access to), can improve general Drupal capabilities in this area.

Previously I had project browser design without RAG (Retrieval Augmented Generation) in mind - to summarize every module description, and then give AI all those summaries. So AI having full context of everything, could produce very accurate answer which module to use for what use case. For this, was working on these modules and issues:

But using full context all the time can be expensive (the bigger the context, the more it costs per request), while RAG retrieved context can cost a lot less.

But best approach maybe is to combine summaries and RAG together, because one of the problems with project browser RAG probably is that not all modules are well described (like wrote more here here Add filter by project dependencies (ecosystem) Active and here 🌱 Project/issue nodes are knowledge that can be graphed Active in more detail), so summarizing all module descriptions first, and then do RAG retrieval can be perfect.

🇱🇹Lithuania mindaugasd

Update initiative front page:

  • Moved section 'Feature sets' and 'Already created Drupal AI solutions'
Production build 0.71.5 2024