Skip to content

Commit d26484c

Browse files
committed
Removed code which fails tests for the moment
1 parent bd55cf4 commit d26484c

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

pkg/ollama/chat.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,7 @@ func (c *Client) ChatGenerate(ctx context.Context, model, prompt string, opts ..
6969
// Create a new request
7070
if req, err := client.NewJSONRequest(request); err != nil {
7171
return response.ChatStatus, err
72-
} else if err := c.DoWithContext(ctx, req, &response, client.OptPath("generate"), client.OptNoTimeout(), client.OptResponse(func() error {
73-
if request.callback != nil && response.Response != "" {
74-
request.callback(response.Response)
75-
}
76-
return nil
77-
})); err != nil {
72+
} else if err := c.DoWithContext(ctx, req, &response, client.OptPath("generate"), client.OptNoTimeout()); err != nil {
7873
return response.ChatStatus, err
7974
}
8075

pkg/ollama/model.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package ollama
33
import (
44
"context"
55
"encoding/json"
6-
"fmt"
76
"net/http"
87
"time"
98

@@ -148,10 +147,7 @@ func (c *Client) PullModel(ctx context.Context, name string) error {
148147

149148
// Send the request
150149
var response respPullModel
151-
return c.DoWithContext(ctx, req, &response, client.OptPath("pull"), client.OptNoTimeout(), client.OptResponse(func() error {
152-
fmt.Println("TOOD:", response)
153-
return nil
154-
}))
150+
return c.DoWithContext(ctx, req, &response, client.OptPath("pull"), client.OptNoTimeout())
155151
}
156152

157153
// Create a new model with a name and contents of the Modelfile

0 commit comments

Comments
 (0)