template build design is garbage from too many variables inter mixing into disconnected logical meanings to an extent, (too many chefs spoil the soup -< template -> x template -> x template -> z template -z
zzzxxzxzxzxzxzxzxxzxzxzxzxxzxzxzx
^^ end result of mixing too many different style templates
^ my opinion
templates needed to be seperate concepts and possibly allowable by end user to install as mods or expansionability
who ever OpenCOG project originally was
- 11-24-2019
* recommended don't use unless you can edit based on my realizations in the last few days Tanya-Kate
https://github.com/c4pt000/docker-Tanya-Kate-mod-OpenCOG
FB mught or might not fix i am leaving this here indefinitely, --> ARC
black expression continued fo shizzle removal
removing z.longsheet.aiml.all.weights.txt template decisions
removing xfind.
script pulled from the OpenCOG project
* update for visual + sound output
(centos)
centos-release-scl.noarch : Software collections from the CentOS SCLo SIG
centos-release-scl-rh.noarch : Software collections from the CentOS SCLo SIG
yum install centos-release-scl
yum install rh-python36
scl enable rh-python36 bash
as root:
sh install-macos-deps.sh
sh macOS_run_server_and_noirc.sh
javascript client as script is running
http://localhost:8001/v1.1/client
chatbot server and client using python from hansonrobotics/chatbot loads a twisted python irc bot
clone the project and run "sh install-deps-ubuntu.sh"
make sure to edit the irc server and channel that the bot connects to and its bot name in scripts/Sophia.py
self.nickname = 'Sophia-bot'
self.join('#null')
reactor.connectTCP('moon.freenode.net', 6667, f)
run the chatbot server and connect the irc bot
"sh run_server_and_ircbot.sh"
javascript client via browser http://localhost:8001/v1.1/client
*thank you to habbasi for helping me debug the irc bot's replies with client.py
This is a premature question-answering server. The goal is to provide a ROS independent, scalable, platform-independent QA.
$ python run.py [port]
The default port is 8001.
The default path of the characters is the current characters directory.
But you can overwrite it by setting the environment variable HR_CHARACTER_PATH
. Use comma seperator. For example
$ HR_CHARACTER_PATH=/path/to/characters1:/path/to/characters2 python run.py
You can wirte either Python or YAML to define your character.
from server.character import AIMLCharacter
# id is an unique global string that refers to this character. name is the character name.
character = AIMLCharacter(id, name)
character.load_aiml_files([file1, file2])
character.set_property_file(abc.properties) # Set the key,value properties.
characters = [character] # you need to put character to this module-wide variable so the server can find and load it
There is a convienent way to load the definition from yaml file.
The yaml file format is like this. The path is relative to the yaml file itself.
id:
han
name:
han
level:
90
weight:
1
property_file:
../../../character_aiml/han.properties
aiml:
- ../../../futurist_aiml/agians.aiml
- ../../../futurist_aiml/aiexistsans.aiml
- ...
There is a client for testing purpose. It is called client.py.
Run $ python client.py
, then you can ask questions and get the answers. Type help
for the usage.
GET /v1.1/start_session
Parameters:
- Auth - Authorization token
- botname - Chatbot name
- user - User name
- test - If true, start a test session, else start a normal session
- refresh - If true, start a new session, else try to reuse the session binding with the same user name
Return:
- ret - Return code
- sid - Session ID
GET /v1.1/chatbots
Parameters:
- Auth - Authorization token
- lang - Language
- session - Session ID
Return:
- ret - Return code
- response
GET /v1.1/chat
Parameters:
- Auth - Authorization token
- question - Question
- lang - Language
- session - Session ID
- query - It's a try ask (True or False)
Return:
- ret - Return code
- response
POST /v1.1/batch_chat
Parameters:
- Auth - Authorization token
- questions - Questions
- lang - Language
- session - Session ID
Return:
- ret - Return code
- response - List of responses
GET /v1.1/bot_names
Parameters:
- Auth - Authorization token
Return:
- ret - Return code
- response
GET /v1.1/set_weights
Parameters:
- Auth - Authorization token
- param - Tier weight parameter. Could be, for example, "0=1, 1=0.5", or "reset"
- session - Session ID
Return:
- ret - Return code
- response
GET /v1.1/upload_character
Parameters:
- Auth - Authorization token
- user - User name
- zipfile - Character package
Return:
- ret - Return code
- response
GET /v1.1/rate
Parameters:
- Auth - Authorization token
- session - Session ID
- index - Index of the answer in the session. For exmaple, -1 means the last response.
- rate - Rate string, such as "good" or "bad".
Return:
- ret - Return code
- response
GET /v1.1/sessions
Parameters:
- Auth - Authorization token
Return:
- ret - Return code
- response
GET /v1.1/set_context
Parameters:
- Auth - Authorization token
- session - Session ID
- context - Context string (format key=value,key2=value2)
Return:
- ret - Return code
- response
GET /v1.1/remove_context
Parameters:
- Auth - Authorization token
- session - Session ID
- context - Context keys (format key,key2,key3,...)
Return:
- ret - Return code
- response
GET /v1.1/get_context
Parameters:
- Auth - Authorization token
- session - Session ID
- lang - Language
Return:
- ret - Return code
- response
GET /v1.1/said
Parameters:
- Auth - Authorization token
- session - Session ID
- message - Message text
Return:
- ret - Return code
- response
GET /v1.1/update_config
Parameters:
- Auth - Authorization token
- config_key - Configuration key
- config_key2 - Configuration key2
- ...
Return:
- ret - Return code
- response