#(drakestein) Extract text from message from IA responses

1 messages · Page 1 of 1 (latest)

vast lily
#

Hi everyone!

I'm trying to integrate AI with NPCs. The question is:

When I send the message to the model, it returns a text similar to the following:
Response:
I'm worried about what's going on! map@[emotion=angry;action=think]

Actions and emotions have variations depending on the AI ​​response
The question is, from this returned message, is there a way to extract the text map@[emotion=angry;action=think]?

The idea is that the response the character receives does not have the map
"map@[emotion=angry;action=think]" and that he can use this map to perform actions with the NPC.

I get the AI ​​response through a webget:

- ~webget <[url]> data:<[data].to_json> headers:<[headers]> save:response

And I get it through the following flag
<util.parse_yaml[<entry[response].result>].get[textResponse]>

Thank you for your time and sorry if my English is bad.

marble scarabBOT
#

(drakestein) Extract text from message from IA responses

marble scarabBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

terse talon
#

Do you want to entirely remove the maptag?

vast lily
# terse talon What text exactly?

I'll try to explain the text a little more.
Here are some examples that the AI ​​will return to me

`Hi Jonh, it's a pleasure to see you again at the tavern map@[emotion=happy;action=greet]

I don't have time for you right now John map@[emotion=disgusted;action=work]

Have a great day John, I hope you come back to the tavern soon map@[emotion=pleased;action=goodbye]`

The structure of the message will always be:

TEXT map@[emotion=VAL1;action=VAL2]

Only the emotion and the action can vary so this map will change, the idea is that we only leave the TEXT and we can extract the whole map.
map@[emotion=VAL1;action=VAL2]

#

In this example you can see that AI messages are sent when one approaches the NPC and when one types

This flag returns that response
<util.parse_yaml[<entry[response].result>].get[textResponse]>

novel hazel
#

What does <util.parse_yaml[<entry[response].result>]> output?

#

please provide a debug/logs of it ^

#

!info debug logs

trail heathBOT
# novel hazel !info debug logs
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

#
Info: logs

Please post your full latest log file.

Background Info: One of the most helpful tools to identifying the source of a problem is your server logs file! Logs contain all sorts of important information like server and plugin versions, any error messages, and a lot more important information (More Info).

How To: Your log can be found in the logs folder within your server folder. The most recent log is a text file labeled latest.log. To get help using these logs, please open that file in a text editor and copy all of the text, then open https://paste.denizenscript.com/New/Log and paste the text into the box on the page. Then click "Submit" and copy the URL and paste that back into this channel.

Please do not upload the file to Discord or to other pastebin services, use the log pastebin linked above.

smoky hillBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@vast lily