¿Sabía usted Bot Libre también proporciona avatares en 3D y una web speech API?
Bugs and Features : Define formula response not working?

RE: Define formula response not working?

por aazxcqwe publicado Jan 10 2015, 17:46

Any help on a 'Correction' script would be appreciated. Trying to implement something like in aiml, where I say 'wrong' or 'correction' and type in the correct response. So far the code I have is below. I'm trying to retrieve the current response and output to dialog. Then I was going to grapple with the 'set' operator to somehow define the correct response. Would that work?

So far, I have the syntax working to get the last input (copied) from the Loop script, but I have "test" returning for all the 'last #' items of the conversation. Also, I am trying to set the topic as per the Introduction to Self .. post using 'set #topic on :conversation to "topic1"' but it throws compile error about the 'on' part of that statement and errors in chat debug log without the 'on :conversation'. I'm not sure which relationship returned by the All operator is the response, or what other relationships to probe with it. 'assign :all1 to (all #response from :targetlast)' would seem most obvious, but throws chat debug errors.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Initial Self programmed state machine for Comprehension
// This state machine is used by the bot to program itself.
State:Correction {
    case :input goto State:sentenceState for each #word of :sentence;
    :input {
        set #input to :sentence;
        set #speaker to :speaker;
        set #conversation to :conversation;
        set #target to :target;
    }
    :sentence {
        set #instantiation to #sentence;
    }
    State:sentenceState {
        do (assign :response to (new #sentence));
        case "correction" goto State:correction;
        case "show" goto State:show;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Id: 701331
Publicado: Jan 10 2015, 17:46
Actualizado: Jan 10 2015, 23:56
Respuestas: 0
Vistas: 1919, hoy: 3, la semana: 3, mes: 9
0 0 0.0/5