See also, What's New in AIML 2.
The Self scripting language is Bot Libre's language for scripting bot responses. Self is based on the syntax of JavaScript with several extensions for language processing. Self is an integrated environment that merges JavaScript, state machines, patterns, and an object database.
I have a local install of CE installed on docker. Its running great with no issues. My question is, in SELF, is there any way I can integrate a locally running LLM running on PyTorch to my bot? Another idea I had was to also try and make an inference API call on one of the pretrained models on huggingface and I haven't been able to get that to work either. I'm new to self and I'm kind of scratching my head with this problem.
WOW!!!!
thank you for the fast help!
it works...
edited: it works in my html file at my PC but online at my webspace works only [Soma FM] ...
So the bot in this script uses "commands" in Bot Libre to pass back the audio commands to the client.
Your web or mobile client needs to process these commands to play the audio.
In the example website it uses some JavaScript code to process the audio command, you need this code for you bot to play audio.
The idea comes from:
https://www.botlibre.com/script?id=36415757 and
https://www.botlibre.com/script?id=36393269
in the example it works only with this website.
In the code from the first link are only entries to ***.mp3 so i tried with other files and it worked, but not with radiostreams...
Hello!
can someone help me with this?
i tried to modify the "musicplayer" script for playing my favoriteradio station, but what must i do now?
where must i put this to let my bot play?
(english is not so easy for me. my mothertongue is german.)
Glad to hear you got it working.
I figured it out the .elements.[0] does not work. But, if you use this syntax:
conversation.topic.description = resp.result.CVE_Items.get(#element, 0).cve.description.description_data.get(#element, 0).value;
it returns the nested string description. So, the whole script which retrieves a description of a CVE inquiry is:
Thanks that debug mode is very helpful. The JSON object "elements" command throws an error that says Invalid attribute name: [ which seems to be around the elements.[0]. Is there a doc somewhere that explains how json parsing in self works? I can parse other things out of the json like in python but when I get to the nested elements, it throws an error.
First you have learning enabled, this is not recommend and will make the bot learn EVERY reply you give it as a new response.
For your scripts, the best way to debug a script is to click on the "debug" checkbox in chat and set the log level to FINE.
My script seems ok, I can do this in Python, it doesn't throw errors but the bot never responds to a question like What is CVE-2022-29315
what do i need to do that?
how can i add my own avatars to the empty template in botlibre for desktop?
I am looking at making a virtual ME for my kids. The idea is so that at some point it is a virtual me that will be around if I am not. I have it set with lots of questions / answers that I setup from a chat corpus when using chatterbot. Chatterbot could not do context. Here is what I would like. To keep a "Diary" of my days. I would like to do things like.
How can I make my bot connect to these dictionaries if I got an API.
Am not a programmar but can type at least.
When I look at "past conversations" I see that my bot has some pre-programmed logic for twitter. Such as it tweets: "Talking with anonymous on #botlibre"
Also, which self script is responsible for taking the word don't that is typed in chat, and turns it into do not for pattern matching
You can either merge the files into one, or upload them one by one.
If you upload them to your script library, you can also them import them to your bot many at a time.
I started to build my bot back in 2014, but had dropped it for a while
Looks correct, except change 10 to 5 here, as you only have 5 responses,
>> if (n == null || n > 10) { n = 0}
if (n == null || n > 5) { n = 0}
The keyword is the pattern in your script, currently you have "omobaiday".
Also make sure you add the script to your bot.
Many thanks @admin.I am not very technical, so I was wondering if I can get some help in configuring it properly, please.
Here is my script: https://www.botlibre.com/script?source=true&id=32651321Can you please can tell me what I need to change in the script?
I have the following questions.
Is there anyone here who is good with the scripting function?I have a TwitterBot project
There seems to be an issue with it not choosing the pattern * with a <that> and <topic> over the category with just the <topic>.
If you move the <that> category first it should work,
Hi
I am new to AIML Scripting. I do not able to figure out why the below script is not working as it intend to be. I am trying to simulate a login dialog. After the password was keyed in, the same question of asking password is repeated. The same script is working at pandxxx platform. I am using topic and the control tags to control my context.
Hello o/
Could you give me a hand again?
What is the max size of a string that I can get from a Http.requestText request? It is truncating.
Code:
function searchGoogle(){
The max string length in Self is 1k. If you need to return text greater than 1k, you need to use a Paragraph object.
Hi there!
Im generating a string with a list of issues for the bot. Ive noticed it is truncating when it shows up in the response. What is the max size of a string allowed in the response (template)? Im doing this using self.
Thank you!!
:)
Be sure to assign the variable a value first before trying to add to it, otherwise you are adding elements in the null object. The 'element' field can be used to access an array's elements.
First of all, thank you very much for the hints. As the current doubt:If I do this:
#Global.assuntos.add("autotutela"); #Global.assuntos.add("jurisdição"); #Global.assuntos.add("inafastabilidade da jurisdição");
How can I retrieve the itens? Or even one of them?
Ive tried these without success:
Pardon me for the basic question,but here we go:
Im trying to define a global variable in a self script that I can access in the bot´s response templates. I was searching the scripts but couldnt find, at least in a way it works. Im probably missing something. I've tried something like the code below:
state MyScript { pattern "create variable" template createIt();
To create a random in Self use the Math.random() function,
as like the title. i wanna ask something
so right now im trying building facebook page autopost bot.
may with-ur-kindness , help me to script things like :
1. create a new variable, which it from a random numeric from 4 to 9
2. after get the variable number, we use it to create a total lists by the variable, ex: we got 5. so it will create a new list for 5 rows.
The <that> tag in AIML can also be a pattern, in this case you would need to use a pattern if the previous response was a template.
<category><pattern>NO</pattern><that>DO YOU WANT TO DIE *</that><template>Okay, then let's talk this out.</template></category>
You can also use a response list for this instead, which lets you use "next", which is a better way to define a follow-up response.
Hey all! I'm new to AIML and just creating bots in general. Working on one for my masters thesis. I tried googling and while the answer may be out there, I think I just don't really know what to search for because I couldn't find anything? Anyway, my question is:
When using <that> </that>, if my "that" sentence has some other element, do I remove the punctuation? For example:-
Which is correct?
Your error shows you are trying to import the file as a "script". The file is a "response list" not a script.
You need to import it from your bot's Training & Chat Logs page as a "Response List".
This is my script here, I am trying to import it through the Training and Chat Logs page ans a response file.
https://www.botlibre.com/script?id=22055941
I get the same error over and over
Also when I remove line one, which is "name", and try to reupload, then I get an error about #age, which was line two, and is now line one.
But it's basically the same error
This is the exact error that I get when I import it through "training and chat logs"
Unexpect element #name Line: "set #name to "ALEX" on #self" Line number: 1
Yes that is what I was thinking. I have tried numerous times to import it. I keep getting an error, something about "line 1" but no matter what I do to import it, it fails. Do you have any suggestions?
What would you do to import it?
I have attempted to load the responses that I found a script for at
https://github.com/cliffe/hackerbot/blob/master/config/AIML/ALICE+profile.res
But I get an error trying to load it as "self" or as "response"
Where would this logic be placed? It is responses to ALICE profile questions.
Hi, I have a pattern with 3 stars, pattern "* * *" template relearn();
then I can read sigle parameters by using:
var brand = sentence.get(#word, 0); var series = sentence.get(#word, 1); var year = sentence.get(#word, 2);
but one of the parameter can have space for example par1 par2 par 3
so the words become 4 becose a space.
Hi, I need to understand how patterns work in Self script.
For example:
I need to search a product code in my database, the user should write something like this in the chat:
"What is the firmware relearn of product" "ATtiny25 series 3"
this is the ask this is parameter