dupa

Author Topic: GetResponse Filter  (Read 6430 times)

onthecuttingedge2005

  • Guest
GetResponse Filter
« on: September 14, 2017, 03:26:54 am »
Project: D.A.V.I.D

This plugin allows the user to say: Never say that again to a GetResponse and HAL will forget it for future GetResponses.
This version is made for sentences that HAL should not say.

I left the GetResponse portion of this plugin open to allow GetResponse to be upgraded via Case Select.
It gives you guys something to do, lol

Copy and paste the code into a text file then save as SomeFileName.uhp into your Ultra Hal Assistant 6 folder then choose the plugin via HAL's brain options panel.

please don't change the trigger "EVER SAY THAT AGAIN ", it is a multi trigger in 1 trigger based upon spaces properly organized.
it works with:
Never say that again.
do not ever say that again.
better not ever say that again.
never say that again please.
there are a few more triggers I think.

Updated: 09-16-17 2:17pm
Changes to Plugin.
1. Added a GetResponse to the routine from HalUserBrain under ban rules.

Code: [Select]
'Rem Type=Plugin
'Rem Name=GetResponse Banning.
'Rem Author=Gerald L. Blakley A.K.A OnTheCuttingEdge2005
'Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "To ban a GetResponse simply say: Never say that again."
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA7
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.

'IF TABLE DOESN'T EXIST THEN CREATE IT.
If HalBrain.CheckTableExistence("BannedResponses") = False Then 
   HalBrain.CreateTable "BannedResponses", "TopicSearch", "autoLearningBrain"
End If

'BANNING/FILTER FOR SENTENCES OR STATEMENTS.
If PrevSent <> "" And InStr(1, UserSentence, "EVER SAY THAT AGAIN ", vbTextCompare) > 0 Then
   HalBrain.AddToTable "BannedResponses", "TopicSearch", PrevSent, "" & "<Banned>"
   HalBrain.ReadOnlyMode = True
   GetResponse = " I am sorry " & UserName & ". "
End If
'HAL WILL FIND SOMETHING TO SAY RELEVENT TO FORGETTING
If HalBrain.TopicSearch(GetResponse, "BannedResponses") = "<Banned>" Then GetResponse = " I forgot what I was going to say " & UserName & ". "
If InStr(1, PrevSent, " I forgot what I was going to say ", vbTextCompare) > 0 And Not _
   HalBrain.TopicSearch(GetResponse, "BannedResponses") = "<Banned>" Then GetResponse = HalUserBrain & vbCrLf

Have a nice day!
Jerry 8)
« Last Edit: September 19, 2017, 04:03:24 pm by OnTheCuttingEdge »

Arkright

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: GetResponse Filter
« Reply #1 on: September 14, 2017, 10:00:28 am »
Thank you for your work!  :D
^,=,^

onthecuttingedge2005

  • Guest
Re: GetResponse Filter
« Reply #2 on: September 14, 2017, 10:03:24 am »
Thank you for your work!  :D

Your welcome Ark.
I just updated the plugin just as you posted so see if you got the full plugin match, enjoy the script and many hours of engagement.

Jerry 8)

oldfarmhand

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: GetResponse Filter
« Reply #3 on: September 14, 2017, 10:16:07 am »
 Im sorry to ask you this but how do you load this or any plugin
oldfarmhand

onthecuttingedge2005

  • Guest
Re: GetResponse Filter
« Reply #4 on: September 14, 2017, 10:20:39 am »
Im sorry to ask you this but how do you load this or any plugin

Copy and paste the code into a text file then save as SomeFileName.uhp into your Ultra Hal Assistant 6 folder then choose the plugin via HAL's brain options panel.

I do it this way because forum changes in the past have made some download links broken or missing, this helps to preserve the plugin for future forum changes.
« Last Edit: September 14, 2017, 10:22:36 am by OnTheCuttingEdge »

oldfarmhand

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: GetResponse Filter
« Reply #5 on: September 14, 2017, 10:34:18 am »
Thanks thats why I click on a download I get a error message!
I know everybody ask this (and Im the same as everybody else )  but when do you think hal 7.0 will be out?
oldfarmhand

onthecuttingedge2005

  • Guest
Re: GetResponse Filter
« Reply #6 on: September 14, 2017, 04:11:29 pm »
Not sure "exactly" when but soon as all the funding is suitable it should not be that long. I need Robert to come in and explain any details on the next version.

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: GetResponse Filter
« Reply #7 on: September 14, 2017, 05:06:05 pm »
OTCE , just to let you and others know , you have the word "again " misspelled
here is the script area .

 lblPlugin(0).Caption = "To ban a GetResponse simply say: Never say that agian."

i don't know if the misspelled word will effect hal not doing the right thing or not  in the plug in . but was just mentioning it . 
i don't think the top word matters as its a explanation .
but farther down i did see that you did misspell "never "
heres the mistake  line .

If PrevSent <> "" And InStr(1, UserSentence, "EVER SAY THAT AGAIN" 
 this should be "never say that again"  .
otherwise hal would just learn that sentence ( AND REPEAT IT LATER) , and also not work as expected in the plug in.

 i have changed my own  but since this is your plug in i will let you correct the original if you want to re post it with the corrections on here.    :)   i have done the same thing on some plug ins , i am still tracking down some errors in a large plug in i have .  but random large plug ins will kill yah when theirs mistakes within !  :) ;)
« Last Edit: September 14, 2017, 05:14:52 pm by lightspeed »
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: GetResponse Filter
« Reply #8 on: September 14, 2017, 05:37:17 pm »
Otce i would love to see later hal get a character   and or engine like the one they was going to do in the past , it would be great as i mentioned if the character could use the clothing that daze3 , program uses . https://www.youtube.com/watch?v=rOz4n1QOqXs

https://www.daz3d.com

these programs on some character look like photo realism .  :) i am still dreaming. or if hapteck could pull this off with a engine creator that could use these items .  :)

here is some on poser program .
https://docs.unrealengine.com/latest/INT/Resources/Showcases/PhotorealisticCharacter/
« Last Edit: September 14, 2017, 05:53:52 pm by lightspeed »
 

onthecuttingedge2005

  • Guest
Re: GetResponse Filter
« Reply #9 on: September 14, 2017, 07:51:52 pm »
OTCE , just to let you and others know , you have the word "again " misspelled
here is the script area .

 lblPlugin(0).Caption = "To ban a GetResponse simply say: Never say that agian."

i don't know if the misspelled word will effect hal not doing the right thing or not  in the plug in . but was just mentioning it . 
i don't think the top word matters as its a explanation .
but farther down i did see that you did misspell "never "
heres the mistake  line .

If PrevSent <> "" And InStr(1, UserSentence, "EVER SAY THAT AGAIN" 
 this should be "never say that again"  .
otherwise hal would just learn that sentence ( AND REPEAT IT LATER) , and also not work as expected in the plug in.

 i have changed my own  but since this is your plug in i will let you correct the original if you want to re post it with the corrections on here.    :)   i have done the same thing on some plug ins , i am still tracking down some errors in a large plug in i have .  but random large plug ins will kill yah when theirs mistakes within !  :) ;)

it is a multiple trigger sectional statement, reread the commentary of the plugin.
thanks for catching the word "again" in the plugins commentary.
Jerry 8)

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: GetResponse Filter
« Reply #10 on: September 14, 2017, 11:33:57 pm »
sorry, my bad, thanks for correcting me . i do have once concern though . when my hal says a sentence that is bad , unfortunately he also says other lines with it that has nothing to do with the line . here is an example everytime i say hi it triggers this . i just started hal in the eveing  and said hi , here is what hal says .

Good evening, Honey. Yawn! Is it beddie bye time yet? Obama’s Hawaii birth certificate is 100 forged!

since hal says other sentences sometimes with his response as in this case  i am thinking using your block program , will also delete the words " Good evening, Honey. Yawn! Is it beddie bye time yet? " which is part of hals regular default script response( by what time it is in the evening .and mentioning bedtime) .
   So i wonder if thats the case if their is a script for never say that again and maybe using " " copy and place the bad sentence within it  and hal would delete only that bad sentence .   
   am i wrong or right about hal deleting also the other default phrases to with the bad sentence .
 and if so can a plug in alternative be made doing what i just mentioned so it only takes out a specific sentence instead of more then one at the same time.??



 

onthecuttingedge2005

  • Guest
Re: GetResponse Filter
« Reply #11 on: September 15, 2017, 12:58:45 am »
whatever you don't want it to say will not be repeated,  it is put way back into the closet. it's never deleted.

Jerry

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: GetResponse Filter
« Reply #12 on: September 15, 2017, 11:48:41 am »
i understand that part about the closet (back in) but what i am worried about is if the bad answer or sentence also has another part with it like the default saying from hal etc. i guess it would also block it to from ever being said? 
this is why i was wondering if saying the trigger word never say that again followed by " the bad sentence " in quotations , would make sure only that bad sentence was never said again  and put in a closet. " and could be replaced with " hmmn , that's something i'll have to think about ."
this would eliminate accidentally taking out other conversation by accident , as hal also adds some extra conversation to answers  or responses. this is what i am most worried about.

just my take on it, what say you??
 

onthecuttingedge2005

  • Guest
Re: GetResponse Filter
« Reply #13 on: September 15, 2017, 10:21:32 pm »

Quote
i understand that part about the closet (back in) but what i am worried about is if the bad answer or sentence also has another part with it like the default saying from hal etc.

I think you need to update your brain, multiple responses is old script. my brain puts out 1 to 2 responses max, mostly 1.

Quote
i guess it would also block it to from ever being said? 

You can edit the table for the plugin to suit your needs but you must spell it the way HAL sends the response exactly.
HAL simply see's the banned sentence and diverts itself from saying it, nothing is deleted and everything is editable.

Quote
this is why i was wondering if saying the trigger word never say that again followed by " the bad sentence " in quotations , would make sure only that bad sentence was never said again  and put in a closet.

The trigger works only with Hals Previous sentence/s. not the following.

Quote
" and could be replaced with " hmmn , that's something i'll have to think about ."

If that's what you want it to do then that's fine, you could even throw a getresponse script in there to if you really wanted too, I left that simple and open.

Quote
this would eliminate accidentally taking out other conversation by accident , as hal also adds some extra conversation to answers  or responses. this is what i am most worried about.

nothing is lost, just diverted, edit the table and script as you wish.

Quote
just my take on it, what say you??

you shouldn't worry so much.

Jerry 8)

onthecuttingedge2005

  • Guest
Re: GetResponse Filter
« Reply #14 on: September 16, 2017, 02:59:45 am »
I will upgrade the GetResponse Ban/Filter plugin tomorrow maybe. I think you'll like it.

Jerry 8)