Unknown Country
Asked

Of Course! Here'S A Sample Email That You Can Use To Reach Out To The Synthiam

Hello Synthiam ARC Support Team,

I hope this email finds you well. I am currently working on a project where I am trying to integrate an external chatbot with the ARC platform. My goal is to have my robot utilize the chatbot's responses for user interactions.

Here's a brief overview of my setup:

I have a chatbot that is accessible via an HTTP POST request. I would like to send queries to this chatbot from ARC and receive responses. Based on these responses, I aim to make the robot perform certain actions or communicate the response back to the user. I've tried using a Python script to handle the HTTP requests, and I wanted to invoke this script from within ARC. However, I encountered some challenges in executing external commands directly from the ARC scripting environment.

I'm reaching out to ask if there's a recommended method or best practice for integrating external APIs or chatbots with ARC. Any plugins, tools, or scripting techniques that you could suggest would be greatly appreciated?


Related Hardware EZ-B v4
Related Control Script

ARC Pro

Upgrade to ARC Pro

Don't limit your robot's potential – subscribe to ARC Pro and transform it into a dynamic, intelligent machine.

PRO
Canada
#1  

Hello,

You can use the HTTP Server robot skill in ARC to communicate with your external chatbot. This skill allows ARC to act as a web server, accepting HTTP POST and GET requests. You can use these requests to trigger actions or scripts within ARC.

Here's a brief overview of how you can set this up:

  1. Add the HTTP Server skill to your ARC project (Project -> Add Skill -> General -> HTTP Server).

  2. In the HTTP Server settings, you can specify the port number for the server to listen on. Make sure this port is accessible to the system running your chatbot.

  3. You can define routes in the HTTP Server skill. Each route corresponds to a specific URL endpoint. When a request is made to that endpoint, the corresponding script is executed.

  4. In the script for each route, you can use the $HttpRequestData variable to access the data sent in the HTTP request. This could be the query for your chatbot.

  5. You can then use this data to trigger actions in ARC, such as moving servos, playing sounds, or using the Speech Synthesis skill to make your robot speak the chatbot's response.

Remember, the HTTP Server skill in ARC can only accept connections and cannot make outgoing HTTP requests. If you need to make HTTP requests from ARC to your chatbot, you would need to use a different method, such as running a separate script outside of ARC to handle the HTTP communication and then use the HTTP Server skill to communicate between this script and ARC.

Please note that while ARC has a Python robot skill, it is not designed to execute external commands or scripts. It is intended for running Python code within the ARC environment.

I hope this helps! If you have any further questions, feel free to ask.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
Unknown Country
#3  

So I have my own custom chatbot, not related to OpenAI. I wish to run that on the Synthiam ARC Software

Unknown Country
#5  

Hey thanks for your assistance. We keep trying to use the python HTTPPost function, but we were unable to get the desired response. We are not sure, but we think it has something to do with headers.

We did check our internet, it was available. The get command worked, but the post did not.

import json

url = "xxxxxx" print(Net.HTTPGet(url))

url = "xxxxxx"

data = {'ID': 'Guest','query': 'WHAT IS YOUR NAME?'}

Convert the dictionary to a JSON string

data_string = json.dumps(data) print(data_string)

Send the POST request

response = Net.HTTPPost(url, data_string)

print(response)

result

Start

{"Message":"polo"}

{"ID": "Guest", "query": "WHAT IS YOUR NAME?"}

{"detail":[{"loc":["body"],"msg":"value is not a valid dict","type":"type_error.dict"}]}

Done (00:00:00.5771125)

PRO
Canada
#6  

Sure, here is a response requesting a captcha for new accounts.

Hi  {"Support_Name,:DJ’} It maybe time for the addition of a {security:captcha} for {Account_Type:new} accounts.

Regards {User_Name:NInk}.

PRO
Synthiam
#7  

@sidd it looks like your custom chatbot server is not parsing get json correctly. You may need to debug you server to view the post content to see how it is being interpreted.

@Nink - this does appear to be a real person.:)

There is google captcha on new account and contact us. You’ll see the little floating G in the bottom corner for it. The odd spam we get is because real people are doing it, not bots.

Unknown Country
#8  

Okay, thank you. I will look for a workaround as we want to avoid making any changes to the server.

Unknown Country
#10  

Yeah that was going to be our next approach, creating a skill and then deploying it. Thank you!