Skip to content

Commit 7ffad0c

Browse files
authored
Update ollama.go
1 parent 650fb59 commit 7ffad0c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

embedder/ollama/ollama.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ const (
1717
defaultEndpoint = "http://localhost:11434/api"
1818
)
1919

20-
type ErrorOllamaEmbed struct {
20+
type OllamaEmbedError struct {
2121
Err error
2222
}
2323

24-
func (e *ErrorOllamaEmbed) Error() string {
24+
func (e *OllamaEmbedError) Error() string {
2525
return fmt.Sprintf("Error embedding text: %v", e.Err)
2626
}
2727

@@ -100,7 +100,7 @@ func (e *Embedder) embed(ctx context.Context, text string) (embedder.Embedding,
100100
}
101101

102102
if resp.HTTPStatusCode >= http.StatusBadRequest {
103-
return nil, &ErrorOllamaEmbed{
103+
return nil, &OllamaEmbedError{
104104
Err: errors.New(string(resp.RawBody)),
105105
}
106106
}

0 commit comments

Comments
 (0)