Rename package
This commit is contained in:
16
Makefile
16
Makefile
@@ -4,15 +4,19 @@ IMAGE_NAME?=webui
|
|||||||
tests:
|
tests:
|
||||||
$(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --fail-fast -v -r ./...
|
$(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --fail-fast -v -r ./...
|
||||||
|
|
||||||
webui-nokb:
|
run-nokb:
|
||||||
$(MAKE) webui KBDISABLEINDEX=true
|
$(MAKE) run KBDISABLEINDEX=true
|
||||||
|
|
||||||
.PHONY: webui
|
.PHONY: build
|
||||||
webui:
|
build:
|
||||||
|
$(GOCMD) build -o localagent ./
|
||||||
|
|
||||||
|
.PHONY: run
|
||||||
|
run:
|
||||||
$(GOCMD) run ./
|
$(GOCMD) run ./
|
||||||
|
|
||||||
webui-image:
|
build-image:
|
||||||
docker build -t $(IMAGE_NAME) -f Dockerfile.webui .
|
docker build -t $(IMAGE_NAME) -f Dockerfile.webui .
|
||||||
|
|
||||||
webui-push:
|
image-push:
|
||||||
docker push $(IMAGE_NAME)
|
docker push $(IMAGE_NAME)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||

|

|
||||||
|
|
||||||
## Connectors
|
## Connectors
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
"github.com/traefik/yaegi/interp"
|
"github.com/traefik/yaegi/interp"
|
||||||
"github.com/traefik/yaegi/stdlib"
|
"github.com/traefik/yaegi/stdlib"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package action_test
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
. "github.com/mudler/local-agent-framework/core/action"
|
. "github.com/mudler/LocalAgent/core/action"
|
||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
|
|
||||||
"github.com/sashabaranov/go-openai"
|
"github.com/sashabaranov/go-openai"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/mudler/local-agent-framework/pkg/llm"
|
"github.com/mudler/LocalAgent/pkg/llm"
|
||||||
"github.com/sashabaranov/go-openai"
|
"github.com/sashabaranov/go-openai"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
. "github.com/mudler/local-agent-framework/core/agent"
|
. "github.com/mudler/LocalAgent/core/agent"
|
||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/mudler/local-agent-framework/pkg/llm"
|
"github.com/mudler/LocalAgent/pkg/llm"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PromptHUD contains
|
// PromptHUD contains
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package agent_test
|
package agent_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "github.com/mudler/local-agent-framework/core/agent"
|
. "github.com/mudler/LocalAgent/core/agent"
|
||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"html/template"
|
"html/template"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/sashabaranov/go-openai"
|
"github.com/sashabaranov/go-openai"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package state
|
package state
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mudler/local-agent-framework/core/agent"
|
"github.com/mudler/LocalAgent/core/agent"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ConnectorConfig struct {
|
type ConnectorConfig struct {
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
. "github.com/mudler/local-agent-framework/core/agent"
|
. "github.com/mudler/LocalAgent/core/agent"
|
||||||
"jaytaylor.com/html2text"
|
"jaytaylor.com/html2text"
|
||||||
|
|
||||||
sitemap "github.com/oxffaa/gopher-parse-sitemap"
|
sitemap "github.com/oxffaa/gopher-parse-sitemap"
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/agent"
|
"github.com/mudler/LocalAgent/core/agent"
|
||||||
. "github.com/mudler/local-agent-framework/core/agent"
|
. "github.com/mudler/LocalAgent/core/agent"
|
||||||
"github.com/mudler/local-agent-framework/core/sse"
|
"github.com/mudler/LocalAgent/core/sse"
|
||||||
"github.com/mudler/local-agent-framework/pkg/utils"
|
"github.com/mudler/LocalAgent/pkg/utils"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AgentPool struct {
|
type AgentPool struct {
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
|||||||
module github.com/mudler/local-agent-framework
|
module github.com/mudler/LocalAgent
|
||||||
|
|
||||||
go 1.22.0
|
go 1.22.0
|
||||||
|
|
||||||
|
|||||||
10
main.go
10
main.go
@@ -5,11 +5,11 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/agent"
|
"github.com/mudler/LocalAgent/core/agent"
|
||||||
"github.com/mudler/local-agent-framework/core/state"
|
"github.com/mudler/LocalAgent/core/state"
|
||||||
"github.com/mudler/local-agent-framework/pkg/llm"
|
"github.com/mudler/LocalAgent/pkg/llm"
|
||||||
rag "github.com/mudler/local-agent-framework/pkg/vectorstore"
|
rag "github.com/mudler/LocalAgent/pkg/vectorstore"
|
||||||
"github.com/mudler/local-agent-framework/webui"
|
"github.com/mudler/LocalAgent/webui"
|
||||||
)
|
)
|
||||||
|
|
||||||
var testModel = os.Getenv("TEST_MODEL")
|
var testModel = os.Getenv("TEST_MODEL")
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
"jaytaylor.com/html2text"
|
"jaytaylor.com/html2text"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/google/go-github/v61/github"
|
"github.com/google/go-github/v61/github"
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/google/go-github/v61/github"
|
"github.com/google/go-github/v61/github"
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/google/go-github/v61/github"
|
"github.com/google/go-github/v61/github"
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
"github.com/google/go-github/v61/github"
|
"github.com/google/go-github/v61/github"
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
"github.com/tmc/langchaingo/tools/scraper"
|
"github.com/tmc/langchaingo/tools/scraper"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
"github.com/tmc/langchaingo/tools/duckduckgo"
|
"github.com/tmc/langchaingo/tools/duckduckgo"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/smtp"
|
"net/smtp"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/sashabaranov/go-openai/jsonschema"
|
"github.com/sashabaranov/go-openai/jsonschema"
|
||||||
"github.com/tmc/langchaingo/tools/wikipedia"
|
"github.com/tmc/langchaingo/tools/wikipedia"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/bwmarrin/discordgo"
|
"github.com/bwmarrin/discordgo"
|
||||||
"github.com/mudler/local-agent-framework/core/agent"
|
"github.com/mudler/LocalAgent/core/agent"
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Discord struct {
|
type Discord struct {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/go-github/v61/github"
|
"github.com/google/go-github/v61/github"
|
||||||
"github.com/mudler/local-agent-framework/core/agent"
|
"github.com/mudler/LocalAgent/core/agent"
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
|
|
||||||
"github.com/sashabaranov/go-openai"
|
"github.com/sashabaranov/go-openai"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/go-github/v61/github"
|
"github.com/google/go-github/v61/github"
|
||||||
"github.com/mudler/local-agent-framework/core/agent"
|
"github.com/mudler/LocalAgent/core/agent"
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
|
|
||||||
"github.com/sashabaranov/go-openai"
|
"github.com/sashabaranov/go-openai"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/agent"
|
"github.com/mudler/LocalAgent/core/agent"
|
||||||
|
|
||||||
"github.com/slack-go/slack/socketmode"
|
"github.com/slack-go/slack/socketmode"
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-telegram/bot"
|
"github.com/go-telegram/bot"
|
||||||
"github.com/go-telegram/bot/models"
|
"github.com/go-telegram/bot/models"
|
||||||
"github.com/mudler/local-agent-framework/core/agent"
|
"github.com/mudler/LocalAgent/core/agent"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Telegram struct {
|
type Telegram struct {
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/action"
|
"github.com/mudler/LocalAgent/core/action"
|
||||||
"github.com/mudler/local-agent-framework/core/state"
|
"github.com/mudler/LocalAgent/core/state"
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/agent"
|
"github.com/mudler/LocalAgent/core/agent"
|
||||||
"github.com/mudler/local-agent-framework/services/actions"
|
"github.com/mudler/LocalAgent/services/actions"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/agent"
|
"github.com/mudler/LocalAgent/core/agent"
|
||||||
"github.com/mudler/local-agent-framework/core/sse"
|
"github.com/mudler/LocalAgent/core/sse"
|
||||||
"github.com/mudler/local-agent-framework/core/state"
|
"github.com/mudler/LocalAgent/core/state"
|
||||||
|
|
||||||
"github.com/donseba/go-htmx"
|
"github.com/donseba/go-htmx"
|
||||||
"github.com/dslipak/pdf"
|
"github.com/dslipak/pdf"
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package webui
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/pkg/xlog"
|
"github.com/mudler/LocalAgent/pkg/xlog"
|
||||||
"github.com/mudler/local-agent-framework/services/connectors"
|
"github.com/mudler/LocalAgent/services/connectors"
|
||||||
|
|
||||||
"github.com/mudler/local-agent-framework/core/state"
|
"github.com/mudler/LocalAgent/core/state"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package webui
|
package webui
|
||||||
|
|
||||||
import "github.com/mudler/local-agent-framework/core/state"
|
import "github.com/mudler/LocalAgent/core/state"
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
DefaultChunkSize int
|
DefaultChunkSize int
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import (
|
|||||||
|
|
||||||
fiber "github.com/gofiber/fiber/v2"
|
fiber "github.com/gofiber/fiber/v2"
|
||||||
"github.com/gofiber/fiber/v2/middleware/filesystem"
|
"github.com/gofiber/fiber/v2/middleware/filesystem"
|
||||||
"github.com/mudler/local-agent-framework/core/agent"
|
"github.com/mudler/LocalAgent/core/agent"
|
||||||
"github.com/mudler/local-agent-framework/core/sse"
|
"github.com/mudler/LocalAgent/core/sse"
|
||||||
"github.com/mudler/local-agent-framework/core/state"
|
"github.com/mudler/LocalAgent/core/state"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed views/*
|
//go:embed views/*
|
||||||
|
|||||||
Reference in New Issue
Block a user