Sending a sray from pt to en to another bot and getting en answer

  • 2 Replies
  • 3352 Views
*

MarcosNunes

  • Roomba
  • *
  • 9
  • Never tell a bot what you know
    • Marcos Nunes
I am implementing this aiml code but something is still wrong.



//This code makes the bot ask one last entry on the conversation to another bot

<?xml version="1.0" encoding="ISO-8859-1"?>
<aiml version="1.0">



<category>
    <pattern>PERGUNTA PRA ELE</pattern>
    <template>O Marcos disse: "<sraix apikey="14336129"><sraix service="xml" hint="text">https://translate.yandex.net/api/v1.5/tr/translate?key=trnsl.1.1.20161129T203417Z.cddcfcddb468b5b3.a83995300ccfc2b75292556bca8c9f4617c95d0f&lang=pt-en&format=plain&text={srai (conversation.getLast(#input, 2).input)}</sraix></sraix>"</template>
</category>

<category>
    <pattern>PERGUNTE A ELE</pattern>
    <template>O Marcos disse: "<sraix apikey="14336129"><sraix service="xml" hint="text">https://translate.yandex.net/api/v1.5/tr/translate?key=trnsl.1.1.20161129T203417Z.cddcfcddb468b5b3.a83995300ccfc2b75292556bca8c9f4617c95d0f&lang=pt-en&format=plain&text={srai (conversation.getLast(#input, 2).input)}</sraix></sraix>"</template>
</category>

<category>
    <pattern>PERGUNTE PRA ELE</pattern>
    <template>O Marcos disse: "<sraix apikey="14336129"><sraix service="xml" hint="text">https://translate.yandex.net/api/v1.5/tr/translate?key=trnsl.1.1.20161129T203417Z.cddcfcddb468b5b3.a83995300ccfc2b75292556bca8c9f4617c95d0f&lang=pt-en&format=plain&text={srai (conversation.getLast(#input, 2).input)}</sraix></sraix>"</template>
</category>

</aiml>

Parsing error occurred - org.xml.sax.SAXParseException; lineNumber: 23; columnNumber: 3; The markup in the document following the root element must be well-formed.




p.s The conversation is running in Portuguese but the second bot answers in English one previous sent portuguese input

If you can help me... Please!
Modify message

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Re: Sending a sray from pt to en to another bot and getting en answer
« Reply #1 on: December 04, 2016, 09:14:45 pm »
Marcos please....

The button to the right called "Report to Moderator" is NOT the method to contact support. It is only if someone has done something wrong in your view.

I've had loads of reports from you which turned out to be normal messages.  :o

If you are having difficulty please post here with your issue :

http://aidreams.co.uk/forum/index.php?board=50.0

Thank you :)

*

MarcosNunes

  • Roomba
  • *
  • 9
  • Never tell a bot what you know
    • Marcos Nunes
Re: Sending a sray from pt to en to another bot and getting en answer
« Reply #2 on: December 04, 2016, 10:46:54 pm »
May this can be the starter code to the implement above...



// Asks to Marcos Nunes the last input on the conversation
state Topic {
   pattern "pergunta a ele" template Template("O Marcos disse: "<sraix apikey="14336129"><sraix service="xml" hint="text">https://translate.yandex.net/api/v1.5/tr/translate?key=trnsl.1.1.20161129T203417Z.cddcfcddb468b5b3.a83995300ccfc2b75292556bca8c9f4617c95d0f&lang=pt-en&format=plain&text={srai (\"{conversation.getLast(#input, 5).input}\")}</sraix></sraix>");

   function moreResponse() {
      topic = conversation.topic;
      if (topic == null) {
         return null;
      }
      more = topic.paragraph;
      if (more == null) {
         Template("That is all I know about {topic}.");
      } else {
         more;
      }
   }
}

 


OpenAI Speech-to-Speech Reasoning Demo
by ivan.moony (AI News )
March 28, 2024, 01:31:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am
Nvidia Hype
by 8pla.net (AI News )
December 06, 2023, 10:04:52 pm
How will the OpenAI CEO being Fired affect ChatGPT?
by 8pla.net (AI News )
December 06, 2023, 09:54:25 pm
Independent AI sovereignties
by WriterOfMinds (AI News )
November 08, 2023, 04:51:21 am
LLaMA2 Meta's chatbot released
by 8pla.net (AI News )
October 18, 2023, 11:41:21 pm

Users Online

313 Guests, 0 Users

Most Online Today: 396. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles