[add] Brain files (demo)

This commit is contained in:
Max 2022-05-25 20:33:33 +08:00
parent 357d1e7fc8
commit ad0535e17f
14 changed files with 79 additions and 0 deletions

8
brain/README.md Normal file
View 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 )

View file

@ -0,0 +1 @@
package listen

View file

@ -0,0 +1 @@
package send

View 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

View file

@ -0,0 +1,3 @@
package zouyu
type conn struct{}

View 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
View 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
View 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
View file

@ -0,0 +1 @@
# Command Line Interface

1
brain/cli/cli.go Normal file
View file

@ -0,0 +1 @@
package cli

3
brain/cloud/README.md Normal file
View file

@ -0,0 +1,3 @@
# Cloud
Connecting AI cloud to analyze behaviors

9
brain/types.go Normal file
View 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
View file

@ -0,0 +1 @@
# WEB Interface

1
cmd/brain.go Normal file
View file

@ -0,0 +1 @@
package cmd