-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Richard Palethorpe <io@richiejp.com>
- Loading branch information
Showing
30 changed files
with
3,250 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.go] | ||
indent_style = tab | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[*.proto] | ||
indent_size = 2 | ||
|
||
[*.py] | ||
indent_size = 4 | ||
|
||
[*.js] | ||
indent_size = 2 | ||
|
||
[*.yaml] | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//go:build debug | ||
// +build debug | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/rs/zerolog/log" | ||
) | ||
|
||
func assert(cond bool, msg string) { | ||
if !cond { | ||
log.Fatal().Stack().Msg(msg) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package main | ||
|
||
// Note: this is started internally by LocalAI and a server is allocated for each store | ||
|
||
import ( | ||
"flag" | ||
"os" | ||
|
||
grpc "github.com/go-skynet/LocalAI/pkg/grpc" | ||
"github.com/rs/zerolog" | ||
"github.com/rs/zerolog/log" | ||
) | ||
|
||
var ( | ||
addr = flag.String("addr", "localhost:50051", "the address to connect to") | ||
) | ||
|
||
func main() { | ||
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}) | ||
|
||
flag.Parse() | ||
|
||
if err := grpc.StartServer(*addr, NewStore()); err != nil { | ||
panic(err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//go:build !debug | ||
// +build !debug | ||
|
||
package main | ||
|
||
func assert(cond bool, msg string) { | ||
} |
Oops, something went wrong.