
siddh120011
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?
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:
Add the HTTP Server skill to your ARC project (Project -> Add Skill -> General -> HTTP Server).
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.
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.
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.
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.
The title of this question has be a bit confused but ill bite
There’s several chatbot robot skills in the skill store. I recommend the open ai chat gpt
there’s step by step instructions to do what you want on the chat gpt manual here: https://synthiam.com/Support/Skills/Artificial-Intelligence/OpenAI-ChatGPT?id=21559
So I have my own custom chatbot, not related to OpenAI. I wish to run that on the Synthiam ARC Software
If you prefer python, use this: https://synthiam.com/Support/python-api/Net/hTTPGet
there’s also the same for javascript
or you can use the Post function as well
lastly, if you want to get some attention or charge for your chatbot, create a robot skill to share with others.
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
Done (00:00:00.5771125)
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}.
@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.
Okay, thank you. I will look for a workaround as we want to avoid making any changes to the server.
To have the best integration, I’d recommend creating a robot skill that communicates with your chat bot server
that way, you can add control commands so ppl can send text to it. Here’s the manual: https://synthiam.com/Support/Create-Robot-Skill/Overview
Yeah that was going to be our next approach, creating a skill and then deploying it. Thank you!