Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module github.com/agent-api/ollama
module github.com/joaopandolfi/ollama

go 1.23.3

require (
github.com/agent-api/core v0.0.0-20250320002200-9e435dd4d404
github.com/go-logr/logr v1.4.2
)
require github.com/go-logr/logr v1.4.2

require github.com/joaopandolfi/core v0.0.0-20250526122154-97b01993453b // indirect
7 changes: 2 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
github.com/agent-api/core v0.0.0-20250227162826-246be7c4b3ff h1:6oife6RpbYLDLkLJw6iXJkGAJsbX4b3cbnkRYx3Ton4=
github.com/agent-api/core v0.0.0-20250227162826-246be7c4b3ff/go.mod h1:dubJb1P6cSuYOqQvBX/R9inWvHPMDuXCEwqwZfzXWTk=
github.com/agent-api/core v0.0.0-20250320002200-9e435dd4d404 h1:YcnYeqObLUluLR3FRsFz+DN81zEzqfeWj1B6Dr/O8ds=
github.com/agent-api/core v0.0.0-20250320002200-9e435dd4d404/go.mod h1:cs19K4yBM1F+VAJfR2mNGsNaQABqpAadgkIqQM0Hc0M=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/joaopandolfi/core v0.0.0-20250526122154-97b01993453b h1:LH6BA3rGb6l0df64+LL8c7jk/mZOmMgLUEze7tuQdhA=
github.com/joaopandolfi/core v0.0.0-20250526122154-97b01993453b/go.mod h1:bq2olwaR3muiO5aXdHk8A+1Uw5Vhfdwqo/5uTPyYswU=
11 changes: 9 additions & 2 deletions message.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ollama

import (
"github.com/agent-api/core"
"github.com/agent-api/ollama/client"
"github.com/joaopandolfi/core"
"github.com/joaopandolfi/ollama/client"
)

func convertMessageToOllamaMessage(m *core.Message) *client.Message {
Expand Down Expand Up @@ -32,6 +32,13 @@ func convertMessageToOllamaMessage(m *core.Message) *client.Message {
Content: m.Content,
Images: images,
}

case core.SystemMessageRole:
return &client.Message{
Role: client.RoleSystem,
Content: m.Content,
Images: images,
}
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion models/models.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package models

import "github.com/agent-api/core"
import "github.com/joaopandolfi/core"

// Deepseek models
var DEEPSEEK_R1_7B *core.Model = &core.Model{
Expand Down
4 changes: 2 additions & 2 deletions provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"fmt"

"github.com/agent-api/core"
"github.com/agent-api/ollama/client"
"github.com/go-logr/logr"
"github.com/joaopandolfi/core"
"github.com/joaopandolfi/ollama/client"
)

// Provider implements the LLMProvider interface for Ollama
Expand Down