Documentation ¶
Index ¶
- func GetDashboardData(w http.ResponseWriter, r *http.Request)
- func Reply(request RequestMessage) []byte
- func Serve(_neuralNetworks map[string]network.Network, port string)
- func SocketHandle(w http.ResponseWriter, r *http.Request)
- func Train(w http.ResponseWriter, r *http.Request)
- type Dashboard
- type Layers
- type RequestMessage
- type ResponseMessage
- type Training
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDashboardData ¶
func GetDashboardData(w http.ResponseWriter, r *http.Request)
GetDashboardData encodes the json for the dashboard data
func Reply ¶
func Reply(request RequestMessage) []byte
Reply takes the entry message and returns an array of bytes for the answer
func SocketHandle ¶
func SocketHandle(w http.ResponseWriter, r *http.Request)
SocketHandle manages the entry connections and reply with the neural network
Types ¶
type Layers ¶
type Layers struct { InputNodes int `json:"input"` HiddenLayers int `json:"hidden"` OutputNodes int `json:"output"` }
Layers contains the data of the network's layers
type RequestMessage ¶
type RequestMessage struct { Type int `json:"type"` // 0 for handshakes and 1 for messages Content string `json:"content"` Token string `json:"user_token"` Locale string `json:"locale"` Information user.Information `json:"information"` }
RequestMessage is the structure that uses entry connections to chat with the websocket
type ResponseMessage ¶
type ResponseMessage struct { Content string `json:"content"` Tag string `json:"tag"` Information user.Information `json:"information"` }
ResponseMessage is the structure used to reply to the user through the websocket
Click to show internal directories.
Click to hide internal directories.