mirror of
https://github.com/mudler/LocalAGI.git
synced 2026-07-24 03:10:46 -04:00
feat: bump cogito, use LocalAILLM
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
+4
-2
@@ -15,6 +15,8 @@ import (
|
||||
|
||||
"github.com/modelcontextprotocol/go-sdk/mcp"
|
||||
"github.com/mudler/cogito"
|
||||
"github.com/mudler/cogito/clients"
|
||||
|
||||
"github.com/mudler/xlog"
|
||||
|
||||
"github.com/mudler/LocalAGI/core/action"
|
||||
@@ -89,7 +91,7 @@ func New(opts ...Option) (*Agent, error) {
|
||||
}
|
||||
|
||||
client := llm.NewClient(options.LLMAPI.APIKey, options.LLMAPI.APIURL, options.timeout)
|
||||
llmClient := cogito.NewOpenAILLM(options.LLMAPI.Model, options.LLMAPI.APIKey, options.LLMAPI.APIURL)
|
||||
llmClient := clients.NewLocalAILLM(options.LLMAPI.Model, options.LLMAPI.APIKey, options.LLMAPI.APIURL)
|
||||
c := context.Background()
|
||||
if options.context != nil {
|
||||
c = options.context
|
||||
@@ -1123,7 +1125,7 @@ func (a *Agent) consumeJob(job *types.Job, role string) {
|
||||
cogitoOpts = append(cogitoOpts, cogito.EnableAutoPlanReEvaluator)
|
||||
}
|
||||
if a.options.LLMAPI.ReviewerModel != "" {
|
||||
llmClient := cogito.NewOpenAILLM(a.options.LLMAPI.ReviewerModel, a.options.LLMAPI.APIKey, a.options.LLMAPI.APIURL)
|
||||
llmClient := clients.NewLocalAILLM(a.options.LLMAPI.ReviewerModel, a.options.LLMAPI.APIKey, a.options.LLMAPI.APIURL)
|
||||
cogitoOpts = append(cogitoOpts, cogito.WithReviewerLLM(llmClient))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ require (
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/jung-kurt/gofpdf v1.16.2
|
||||
github.com/modelcontextprotocol/go-sdk v1.1.0
|
||||
github.com/mudler/cogito v0.9.1-0.20260217143801-bb7f986ed2c7
|
||||
github.com/mudler/cogito v0.9.2-0.20260219212236-5c89648cf8cc
|
||||
github.com/mudler/xlog v0.0.1
|
||||
github.com/onsi/ginkgo/v2 v2.25.3
|
||||
github.com/onsi/gomega v1.38.2
|
||||
|
||||
@@ -238,6 +238,8 @@ github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=
|
||||
github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
|
||||
github.com/mudler/cogito v0.9.1-0.20260217143801-bb7f986ed2c7 h1:z3AcM7LbaQb+C955JdSXksHB9B0uWGQpdgl05gJM+9Y=
|
||||
github.com/mudler/cogito v0.9.1-0.20260217143801-bb7f986ed2c7/go.mod h1:6sfja3lcu2nWRzEc0wwqGNu/eCG3EWgij+8s7xyUeQ4=
|
||||
github.com/mudler/cogito v0.9.2-0.20260219212236-5c89648cf8cc h1:AJm0Xy+UtKQXrI2+QIowl+0MDTdZn2qAmXWTeTTwWFw=
|
||||
github.com/mudler/cogito v0.9.2-0.20260219212236-5c89648cf8cc/go.mod h1:6sfja3lcu2nWRzEc0wwqGNu/eCG3EWgij+8s7xyUeQ4=
|
||||
github.com/mudler/xlog v0.0.1 h1:yR3/wszd3ZM6u1n96YITJZ4yUcDgqHSwvQmzUJa+8vg=
|
||||
github.com/mudler/xlog v0.0.1/go.mod h1:39f5vcd05Qd6GWKM8IjyHNQ7AmOx3ZM0YfhfIGhC18U=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
|
||||
Reference in New Issue
Block a user