feat: more embedded models, coqui fixes, add model usage and description (#1556)

* feat: add model descriptions and usage

* remove default model gallery

* models: add embeddings and tts

* docs: update table

* docs: updates

* images: cleanup pip cache after install

* images: always run apt-get clean

* ux: improve gRPC connection errors

* ux: improve some messages

* fix: fix coqui when no AudioPath is passed by

* embedded: add more models

* Add usage

* Reorder table
This commit is contained in:
Ettore Di Giacinto 2024-01-08 00:37:02 +01:00 committed by GitHub
parent 0843fe6c65
commit e19d7226f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 216 additions and 45 deletions

View file

@ -50,7 +50,7 @@ func (c *Client) setBusy(v bool) {
c.Unlock()
}
func (c *Client) HealthCheck(ctx context.Context) bool {
func (c *Client) HealthCheck(ctx context.Context) (bool, error) {
if !c.parallel {
c.opMutex.Lock()
defer c.opMutex.Unlock()
@ -59,8 +59,7 @@ func (c *Client) HealthCheck(ctx context.Context) bool {
defer c.setBusy(false)
conn, err := grpc.Dial(c.address, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
fmt.Println(err)
return false
return false, err
}
defer conn.Close()
client := pb.NewBackendClient(conn)
@ -71,15 +70,14 @@ func (c *Client) HealthCheck(ctx context.Context) bool {
res, err := client.Health(ctx, &pb.HealthMessage{})
if err != nil {
fmt.Println(err)
return false
return false, err
}
if string(res.Message) == "OK" {
return true
return true, nil
}
return false
return false, fmt.Errorf("health check failed: %s", res.Message)
}
func (c *Client) Embeddings(ctx context.Context, in *pb.PredictOptions, opts ...grpc.CallOption) (*pb.EmbeddingResult, error) {