Hi
We are trying to create a "Summarize" button for augmentor to automatically generate a summary for our clients.
Right now we have created the button using a default body field as a source and also the target. The "Summarize" button creates a summary and the hapend it to the body field both in the Body text and summary.

I thought that by setteing the "key" field to "summary" in the form display option that could work but then nothing happen.

Is there a way to target only the Summary of a formatted long text with summary?

Also is there a way with prompt or config to limit the number of characters for a generation? I tryed setting a low amount of token and also asked in th prompt to limit to 150 characters but then it looks like the result is trimmed in the middle of a sentence so it does not make sens for readers.

Thanks for any help with that

Issue fork augmentor-3358807

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

davidiio created an issue. See original summary.

murrayw’s picture

Status: Active » Closed (works as designed)

Unfortunately, at this stage it is not possible to target the Summary field when it is part of the body. This is a limitation of the module as tehre is no way to target the field properties in this way.

In order to achieve what you want, the Summary would need to be split from the Body field so that it could be targetted individually.

For the future this could be a feature request. Adding it in would require a fair bit of effort as field widgets and Actions would need to be updated in order to support it. We do not want to support this at this time.

As a workaround, you could define your own field widget that specifically targetted the summary field. So, it would be possible to take what is in the module and adapt it to your own purposes.

davidiio’s picture

Thanks Murrrayw for your answer and solutions options.
Much appreciated!

mandclu’s picture

Assigned: Unassigned » mandclu
Status: Closed (works as designed) » Active

I believe I have a way to make this work, having implemented something similar for another module.

mandclu’s picture

Version: 1.0.x-dev » 1.1.x-dev
Assigned: mandclu » Unassigned
Status: Active » Needs review

Moving this to a new 1.1.x branch. Also worth noting that to restrict the character count, I set the content of the User message in my Augmentor to be:

Create an SEO friendly meta description of up to 200 characters for the following text, using the same language as the input:

{input}

  • mandclu committed 56beb9ed on 1.1.x
    Issue #3358807 by mandclu: Targeting the Summary field of a long...
mandclu’s picture

Status: Needs review » Fixed

Merged in, and will include this in a new beta release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.