mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-21 19:15:00 +00:00
chore: bump grpc limits to 50MB (#5212)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
8b3f76d8e6
commit
8abecb4a18
13 changed files with 161 additions and 31 deletions
|
@ -244,7 +244,10 @@ func StartServer(address string, model LLM) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
s := grpc.NewServer()
|
||||
s := grpc.NewServer(
|
||||
grpc.MaxRecvMsgSize(50*1024*1024), // 50MB
|
||||
grpc.MaxSendMsgSize(50*1024*1024), // 50MB
|
||||
)
|
||||
pb.RegisterBackendServer(s, &server{llm: model})
|
||||
log.Printf("gRPC Server listening at %v", lis.Addr())
|
||||
if err := s.Serve(lis); err != nil {
|
||||
|
@ -259,7 +262,10 @@ func RunServer(address string, model LLM) (func() error, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s := grpc.NewServer()
|
||||
s := grpc.NewServer(
|
||||
grpc.MaxRecvMsgSize(50*1024*1024), // 50MB
|
||||
grpc.MaxSendMsgSize(50*1024*1024), // 50MB
|
||||
)
|
||||
pb.RegisterBackendServer(s, &server{llm: model})
|
||||
log.Printf("gRPC Server listening at %v", lis.Addr())
|
||||
if err = s.Serve(lis); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue