This python repo wraps our api in a easy to use fast pip installable package. It is almost one to one with ao_core so most of the documentation will carry over here; we will add documentation below for futher instructions on how to use the library!
Install with pip from command line with:
pip install git+https://github.com/aolabsai/ao_python
To get an API key, please message us on discord: https://discord.gg/mE3WBFaMQy
To create a new Arch use:
arch = ao.Arch(arch_i="[1, 1, 1]", arch_z="[1]", connector_function="full_conn",
api_key=api_key, kennel_name=<<insert_unique_ID>>)
To initalise an Agent use:
agent = ao.Agent(Arch=arch,
api_key=api_key)
To invoke an Agent to get its output, use its next_state method:
agent.next_state(INPUT="111"):
response = agent.next_state(INPUT=input, LABEL=label)
agent_output = response["story"] # this is the output of the agent for use in your application
agent_state = response["state"]
print("Agent's response: ", agent_output, " - at state: ", agent_state)
To train an Agent, provide a label with next_state:
agent.next_state(INPUT="000", LABEL="0"):
To delete an Agent from our hosted database use:
agent.delete()