Or 90% right?
Primary value of this is magic experience to the user. And primary user of this is non-technical user.
mindaugasd → created an issue.
Or maybe it does support, proxy is listed as configuration option https://www.php.net/manual/en/context.http.php
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
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.
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.
- https://www.drupal.org/project/ai/issues/3453589#comment-15641623 📌 OpenAI LLM Provider Active
- https://git.drupalcode.org/project/ai/-/merge_requests/1/diffs?commit_id...
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.
Added drupal_cms:
#3467680: [META] Track 20: AI →
✨
Add optional AI capabilities
Active
Relating a very similar issue on moderators project
More issues by @wouters_f
- ai_content_creator 💬 Please consider using the AI module under the hood and link to us. Active
- ai_translate_textfield ✨ Please consider using the AI module. Closed: duplicate
- ai_translator ✨ Please consider the AI module Active
- ai_utilities ✨ Please consider the AI module Closed: works as designed
- butler_ai 💬 Consider using the ai module for AI backends. Active
- cke_5_speech_to_type 💬 Please consider linking to the AI module Active
- ckgpt 📌 Please consider linking to the AI module Active
- drupal_chatbot ✨ Please consider using the AI module as backend Active
- dalle_image_generator ✨ Please consider using the AI module Active
- gutenberg_ai_tools ✨ Please consider using the Ai module Active
- gpt_code_reviewer ✨ Please consider the AI module Active
- metatag_ai 💬 Please consider linking to the AI module on project page Closed: duplicate
- open_ai_metadata ✨ Please consider using or linking to the AI module! Active
- open_chatbot ✨ Please consider linking to the AI module Active
- openai_image_for_drupal ✨ Please consider using the AI module under the hood (or link to us) Active
- openai_function_call ✨ Please consider linking to the AI module on the project page. Active
- prompt 📌 Please consider linking to ai on module page. Active
- recommend_ai ✨ Please consider linking to the AI module (or even use it) Active
- survey_ai ✨ Please consider using the AI module Active
- seo_ai ✨ Please consider linking to the AI module (or using it) Active
- speech_to_text ✨ Please consider using the AI module under the hood or link to us. Active
- tts ✨ Please consider using the AI module under the hood. Active
- vertex_ai_search ✨ Please consider linking to the AI module too on the project page. Closed: works as designed
- webai 💬 Please consider linking to the AI module on your project page. Active
Replacement https://www.drupal.org/project/google_places →
✨ Depend on AI abstraction layer Active
@wouters_f its utilities module and also by FreelyGive.
Drupal could charge
🌱 🚨🚨🚨 IMPORTANT: We are looking for new sponsors to keep the project going! 🚨🚨🚨 Active
Its on the road map
https://www.drupal.org/project/chat →
It is also a duplicate
✨
Rebase on AI module's abstraction layer
Active
Also AI module have their own chat UI for some reason:
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.
Related new module https://www.drupal.org/project/ai_agents →
This module is most amazing example of super high value provided with comparatively little donations.
New related module https://www.drupal.org/project/gutenberg_ai_tools →
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.
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.
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
?
✨ [meta] Where prompts will be used Active
"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.
Done:
- Segment "Header" configuration
- Checkbox "Show header even if segment produce no output"
Title change, reducing the scope to "header" only.
Done parts of feature to override defaults.
Added new proposed solution "Submit whole form with ajax" to the description.
Implemented approach no. 3.
Updated the description with status.
mindaugasd → created an issue.
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.
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.
Another part of equation is not only simple, but flexible, enabling 'ambitious site builders'.
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.
Prototype of this https://www.drupal.org/project/aiwork → is using Gutenberg exactly.
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.
Added 'proposed resolution' to issue description.
Added proposed solutions to the description. Already tried first one (ajax), but did not work.
- 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 →
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?
@wouters_f docs how to use?
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.
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.
A.I.
or
A.I. Artificial Intelligence
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.
🩵 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.
There are many paths:
- 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.
- If there is even more need in specific areas, then AI module can simply expose a text-area to edit the prompt.
- 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.
Of AI prompt engineering → module, therefore, enabling someone who needs it, to customize prompt programatically.
Partly did 1st step, which is working improvement.
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
Another idea:
Assuming, aiprompt module would grow to be used for providing default prompts, then structure could be changed:
- AI prompt - module would provide configuration entity out-of-the-box allowing to provide default prompts.
- AI prompt content - this module would provide additional content entity for advanced needs.
Drupal 11 has new "default content" feature which is part of "recipes" package, maybe it could be (effectively?) adopted.
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'.
mindaugasd → created an issue.
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)
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
Example case ✨ Prompt library in the popup modal Active , where tokens don't need to be processed by the prompt entity.
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
mindaugasd → created an issue.
Did architecture upgrade for this 📌 Rework getSegments() to return objects instead of data, introduce getSegmentsData() for data Fixed
mindaugasd → created an issue.
Will upgrade segment forms as well to use objects instead of data.
mindaugasd → created an issue.
Method can be used for this
protected function configurationReplaceTokens(array $config): array
mindaugasd → created an issue.
mindaugasd → created an issue.
mindaugasd → created an issue.
In latest commit done this:
- Provide tokens generated from arguments.
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.
Graph RAG vs. Vector RAG
https://youtube.com/watch?v=pvXnDNrOOQw
@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:
- To bulk summarize everything ✨ Views bulk operations Active within https://www.drupal.org/project/ai →
- To provide AI context ✨ Create "views" prompt segment plugin Fixed within https://www.drupal.org/project/aiprompt →
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.
Adding picture how it looks like:
Update initiative front page:
- Moved section 'Feature sets' and 'Already created Drupal AI solutions'