Itoshima 🇯🇵
Account created on 24 February 2009, over 15 years ago
  • Senior Drupal Developer at Morpht 
#

Merge Requests

More

Recent comments

🇯🇵Japan eleonel Itoshima 🇯🇵

I can see you are doing a reset($choices), so that means we will have only one option always, please check https://git.drupalcode.org/project/augmentor_chatgpt/-/blob/1.0.x/src/Pl... we should support multiple choices

🇯🇵Japan eleonel Itoshima 🇯🇵

Good finding, please check if the MR that I pushed solves your issue, you could use it as a patch: https://git.drupalcode.org/project/augmentor/-/merge_requests/28.patch

🇯🇵Japan eleonel Itoshima 🇯🇵

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

🇯🇵Japan eleonel Itoshima 🇯🇵

Furthermore I think ->hasTranslation() and ->getTranslation() on $entity would be more sufficient?

The function getTranslationFromContext already checks if the the entity has a translation for the given language: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...

I created a MR with a small change (now we send the langcode parameter).

🇯🇵Japan eleonel Itoshima 🇯🇵

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

🇯🇵Japan eleonel Itoshima 🇯🇵

@Anybody, we will manage that in a different issue https://www.drupal.org/project/entity_reference_display/issues/3312668 📌 Drop the support of Drupal 8 Needs work

🇯🇵Japan eleonel Itoshima 🇯🇵

Thanks everyone for the contributions, I did a bit of refactoring and I pushed the patch to the 2.0.X branch.

🇯🇵Japan eleonel Itoshima 🇯🇵

Thank you for offering to help with the Entity Reference Display module. We truly value your support and the initiative you've shown.

Currently, we have allocated more resources to manage the module effectively and do not require additional maintainers at this moment. However, we encourage you to continue contributing through issue reports and patches, which are greatly appreciated.

We're committed to improving the module's maintenance and ensuring it serves the community well. Thanks again for your understanding and continued support.

🇯🇵Japan eleonel Itoshima 🇯🇵

Is not necessary to send the protocol as an option because by default the Recombee library will use https.

🇯🇵Japan eleonel Itoshima 🇯🇵

Hi there, I wasn't able to replicate the issue using:

  • drupal/core (10.2.x-dev)
  • drupal/augmentor (dev-1.1.x 74c3aaa)
  • drupal/augmentor_chatgpt (dev-1.0.x e2153be)

Could you please upgrading the modules to the latest commits?

🇯🇵Japan eleonel Itoshima 🇯🇵

Sure, I will coordinate that for you. Thanks.

🇯🇵Japan eleonel Itoshima 🇯🇵

I think instead of removing the case for field_storage_config_edit_form we should add an extra case for field_config_edit_form, for compatibility with versions < 10.2.x. What do you think?

🇯🇵Japan eleonel Itoshima 🇯🇵

Thanks everyone for your contributions.

🇯🇵Japan eleonel Itoshima 🇯🇵

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

🇯🇵Japan eleonel Itoshima 🇯🇵

Thanks everyone for your contributions.

🇯🇵Japan eleonel Itoshima 🇯🇵

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

🇯🇵Japan eleonel Itoshima 🇯🇵

Thanks everyone for your contributions.

🇯🇵Japan eleonel Itoshima 🇯🇵

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

🇯🇵Japan eleonel Itoshima 🇯🇵

All good @keiserjb, I pushed a fix for that too, thanks.

🇯🇵Japan eleonel Itoshima 🇯🇵

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

🇯🇵Japan eleonel Itoshima 🇯🇵

THe main augmentor module nows returns the response from the LLM respecting the format: plain text, html, json, and depending on the target field the value will be leaved (for rich text fields) as it is or converted to plain text (for plain text fields and select box, taxonomies, etc)

🇯🇵Japan eleonel Itoshima 🇯🇵

Compatibility with openai-php/client library pushed to the dev branch, thanks everyone.

🇯🇵Japan eleonel Itoshima 🇯🇵

Could you please share a screenshot of the entire augmentor configuration?

🇯🇵Japan eleonel Itoshima 🇯🇵

Added support for Event Subscribers and Hooks.

🇯🇵Japan eleonel Itoshima 🇯🇵

By default now we got the raw format from the response: html, json, etc and assign directly like that to the field types that can handle that and strip html to the plain text field types. We have a lot of flexibility on deciding the output format by adjusting the prompt.

🇯🇵Japan eleonel Itoshima 🇯🇵

Could you please provide some details about the error you can see in the console, also the steps to reproduce the issue, augmentor configuration, etc. Also please try with the latest version of the module to see if this issue is still happening.

🇯🇵Japan eleonel Itoshima 🇯🇵

Great idea, @mandclu. We already have a widget for file types that can handle similar tasks. For instance, check out Augmentor for Google Cloud Text-to-Speech . This widget captures a URL from the response (an audio file), downloads the file, and assigns it to the designated file field, mirroring the approach we're considering here: OpenAI API Reference for Images.

Augmentor is versatile and can be integrated with any fieldable entity. For example, you could add a new "Augmentor" field, select and set up the "Augmentor File Widget", and choose the appropriate image augmentor provider. I suggest (in a separate issue) we develop a configurable augmentor where you can specify the endpoint, and manage basic configurations and responses through the UI. This would allow greater flexibility and ease of use across different projects.

🇯🇵Japan eleonel Itoshima 🇯🇵

I added a new checkbox to debug the input and output of augmentors.

Thanks for your suggestion @mindaugasd but I think we don't need to create a sub-module for a basic input and output logging for a particular augmentor. Also now we have a "Preview" section on each augmentor where you can try and adjust your prompts in a quick way.

🇯🇵Japan eleonel Itoshima 🇯🇵

I can't replicate the issue using the latest version of the module. We refactored and improved the JS event handlers in the past months so we may fixed this already.

🇯🇵Japan eleonel Itoshima 🇯🇵

Issue moved to the main augmentor project.

🇯🇵Japan eleonel Itoshima 🇯🇵

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

🇯🇵Japan eleonel Itoshima 🇯🇵

@keiserjb feel free to share the patch here, on this issue.

🇯🇵Japan eleonel Itoshima 🇯🇵

Thanks, @mindaugasd! With the current functionality of Augmentor and this specific module, it's possible to associate a button with a ChatGPT augmentor and simulate a "chat" using fields in a custom block type. Additionally, we aim to keep the dependencies of this module minimal. Perhaps it would be more beneficial to offer integration with various "LLM connector ecosystems" within the AIChat module. This way, users could select augmentor, interpolator, and other modules directly from there.

🇯🇵Japan eleonel Itoshima 🇯🇵

The implementation looks good @Marcus_Johansson thank you for that!

@ressa, this augmentor module doesn't include any built-in integration with a particular LLM, this module only provides the ecosystem, tools and rules to write submodules than handle the integration with other services, like https://www.drupal.org/project/augmentor_nlpcloud , https://www.drupal.org/project/augmentor_aws or https://www.drupal.org/project/augmentor_chatgpt

Here you will find a presentation about how to create augmentor submodules: https://drupal-camp2023.den-japan.org/session/c05

🇯🇵Japan eleonel Itoshima 🇯🇵

The "Select Regex widget type" was implemented and merged into the stable releases by @mandclu so we can close this.

🇯🇵Japan eleonel Itoshima 🇯🇵

That's a good idea, and the ideal place for this functionality is in a sub-module, please check https://drupal-camp2023.den-japan.org/session/c05 for instructions about how to create an augmentor sub-module.

🇯🇵Japan eleonel Itoshima 🇯🇵

Looking good. Thanks.

🇯🇵Japan eleonel Itoshima 🇯🇵

Solved here: https://www.drupal.org/project/augmentor/issues/3404316#comment-15486501 🐛 Improvement to error handling for Augmentors Fixed

🇯🇵Japan eleonel Itoshima 🇯🇵

I just pushed an improvement in the field description, thanks for your contribution.

🇯🇵Japan eleonel Itoshima 🇯🇵

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

🇯🇵Japan eleonel Itoshima 🇯🇵

Thank you, I pushed a bit of refactoring on that part, it's working fine for me.

🇯🇵Japan eleonel Itoshima 🇯🇵

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

🇯🇵Japan eleonel Itoshima 🇯🇵

Looking good.

🇯🇵Japan eleonel Itoshima 🇯🇵

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

🇯🇵Japan eleonel Itoshima 🇯🇵

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

🇯🇵Japan eleonel Itoshima 🇯🇵

I added two new hooks to alter the input configuration and results:

hook_pre_execute(array &$request_body)

This hook is invoked before the augmentor processing begins. It allows other modules to alter the decoded request body.

Parameters

:
$request_body (array): The decoded request body. It is an associative array that contains the keys 'input' and 'augmentor' (and many others)

Usage:

Implement this hook to modify the request body before the augmentor processes it. For example, you can add, remove, or alter the contents of $request_body.

Example:

function mymodule_pre_execute(array &$request_body) {
  // Modify the request body as needed.
  if (isset($request_body['input'])) {
    $request_body['input'] = "Modified Input";
  }
}

hook_post_execute(array &$result)

This hook is invoked after the augmentor execution is completed. It allows other modules to alter the results of the execution.

Parameters:

$result (array): The results of the augmentor execution. It is an associative array of the results.

Usage:

Implement this hook to modify the results after the augmentor execution. For example, you can process or reformat the results as needed.

Example:

function mymodule_post_execute(array &$result) {
  // Process or alter the results.
  if (!empty($result)) {
    $result['additional_info'] = "Processed Result";
  }
}
🇯🇵Japan eleonel Itoshima 🇯🇵

This issue was solved here https://www.drupal.org/project/augmentor/issues/3410469 🐛 Serialization Error in New Preview Section Fixed for all augmentors.

🇯🇵Japan eleonel Itoshima 🇯🇵

I fixed that issue, please check now.

🇯🇵Japan eleonel Itoshima 🇯🇵

Oh that could be yeah, please try to setup the project in your local with ddev or lando so you can have SSL and run it on your local.

In another issue I'm working in improving the error logging to catch problems like this one and provide more useful information to the user.

🇯🇵Japan eleonel Itoshima 🇯🇵

Attached many UI improvements to make the preview section similar to the way "Views preview" works.

🇯🇵Japan eleonel Itoshima 🇯🇵

Thanks for your understanding and insights. It's great to hear about your approach and how you're working towards your goals. I appreciate your openness to sharing code and ideas – collaboration like this is what makes the community thrive.

No hard feelings at all; I'm looking forward to seeing how our paths might converge in the future. Let's keep in touch and continue to support each other's work!

Production build 0.69.0 2024