[add] Brain files (demo)
This commit is contained in:
parent
357d1e7fc8
commit
ad0535e17f
14 changed files with 79 additions and 0 deletions
8
brain/README.md
Normal file
8
brain/README.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Brain
|
||||
|
||||
the robot who helps you build various types of applications
|
||||
|
||||
the robot has two modes :
|
||||
|
||||
1. Generate an App DSL based on the rules
|
||||
2. Connect AI cloud to generate app DSL based on input ( Not Supported Yet )
|
||||
1
brain/behaviors/listen/listen.go
Normal file
1
brain/behaviors/listen/listen.go
Normal file
|
|
@ -0,0 +1 @@
|
|||
package listen
|
||||
1
brain/behaviors/send/send.go
Normal file
1
brain/behaviors/send/send.go
Normal file
|
|
@ -0,0 +1 @@
|
|||
package send
|
||||
7
brain/behaviors/zouyu/README.md
Normal file
7
brain/behaviors/zouyu/README.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Zouyu
|
||||
|
||||
Zouyu is a benevolent beast in ancient Chinese myths and legends. It is a very precious mythical beast in Lin's country. It is like a tiger, with colorful patterns on its body, and its tail is longer than its body. It looks like a tiger with white hair and black stripes, but it does not eat live animals. Travel thousands of miles a day.
|
||||
|
||||
## Functions
|
||||
|
||||
Connect a Database, generates a dashboard applications
|
||||
3
brain/behaviors/zouyu/types.go
Normal file
3
brain/behaviors/zouyu/types.go
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
package zouyu
|
||||
|
||||
type conn struct{}
|
||||
14
brain/behaviors/zouyu/zouyu.go
Normal file
14
brain/behaviors/zouyu/zouyu.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package zouyu
|
||||
|
||||
// Run the data
|
||||
func Run(dsn string) {}
|
||||
|
||||
func (conn *conn) models() {}
|
||||
|
||||
func (conn *conn) apis() {}
|
||||
|
||||
func (conn *conn) flows() {}
|
||||
|
||||
func (conn *conn) tables() {}
|
||||
|
||||
func (conn *conn) env() {}
|
||||
18
brain/brain.go
Normal file
18
brain/brain.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package brain
|
||||
|
||||
// NewBehaviors Returns the behaviors based on input words
|
||||
func NewBehaviors(words string) (*Behaviors, error) {
|
||||
resp, err := NPL(words)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp.Behaviors, nil
|
||||
}
|
||||
|
||||
// Run the behaviors
|
||||
func (behaviors *Behaviors) Run() {}
|
||||
|
||||
// NPL the Natural language processing
|
||||
func NPL(words string) (*Response, error) {
|
||||
return &Response{Behaviors: &Behaviors{}}, nil
|
||||
}
|
||||
11
brain/brain_test.go
Normal file
11
brain/brain_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package brain
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewBehaviors(t *testing.T) {
|
||||
behaviors, err := NewBehaviors("hello")
|
||||
fmt.Println(behaviors, err)
|
||||
}
|
||||
1
brain/cli/README.md
Normal file
1
brain/cli/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Command Line Interface
|
||||
1
brain/cli/cli.go
Normal file
1
brain/cli/cli.go
Normal file
|
|
@ -0,0 +1 @@
|
|||
package cli
|
||||
3
brain/cloud/README.md
Normal file
3
brain/cloud/README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Cloud
|
||||
|
||||
Connecting AI cloud to analyze behaviors
|
||||
9
brain/types.go
Normal file
9
brain/types.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package brain
|
||||
|
||||
// Behaviors the Behaviors struct
|
||||
type Behaviors struct{}
|
||||
|
||||
// Response NPL Response
|
||||
type Response struct {
|
||||
Behaviors *Behaviors
|
||||
}
|
||||
1
brain/web/README.md
Normal file
1
brain/web/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
# WEB Interface
|
||||
1
cmd/brain.go
Normal file
1
cmd/brain.go
Normal file
|
|
@ -0,0 +1 @@
|
|||
package cmd
|
||||
Loading…
Add table
Reference in a new issue