repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/schema/agent_jobs.go | core/schema/agent_jobs.go | package schema
import (
"time"
)
// Task represents a reusable agent task definition
type Task struct {
ID string `json:"id"` // UUID
Name string `json:"name"` // User-friendly name
Description string `json:"description"` // Optional descri... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/schema/message_test.go | core/schema/message_test.go | package schema_test
import (
"encoding/json"
. "github.com/mudler/LocalAI/core/schema"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
var _ = Describe("LLM tests", func() {
Context("ToProtoMessages conversion", func() {
It("should convert basic message with string content", func() {
messages ... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/schema/localai.go | core/schema/localai.go | package schema
import (
"encoding/json"
"time"
gopsutil "github.com/shirou/gopsutil/v3/process"
)
type BackendMonitorRequest struct {
BasicModelRequest
}
type TokenMetricsRequest struct {
BasicModelRequest
}
type BackendMonitorResponse struct {
MemoryInfo *gopsutil.MemoryInfoStat
MemoryPercent float32
C... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/render.go | core/http/render.go | package http
import (
"embed"
"fmt"
"html/template"
"io"
"io/fs"
"net/http"
"strings"
"github.com/Masterminds/sprig/v3"
"github.com/labstack/echo/v4"
"github.com/microcosm-cc/bluemonday"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/russross/blackfri... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/openai_videos_test.go | core/http/openai_videos_test.go | package http_test
import (
"bytes"
"context"
"encoding/json"
"io"
"net/http"
"os"
"path/filepath"
"time"
"github.com/mudler/LocalAI/core/application"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/pkg/system"
"github.com/mudler/LocalAI/pkg/grpc"
... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/app_test.go | core/http/app_test.go | package http_test
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
"runtime"
"time"
"github.com/mudler/LocalAI/core/application"
"github.com/mudler/LocalAI/core/config"
. "github.com/mudler/LocalAI/core/http"
"github.com/mudler/LocalAI/core/schema"
"github.com/labs... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | true |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/http_suite_test.go | core/http/http_suite_test.go | package http_test
import (
"testing"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
func TestLocalAI(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "LocalAI HTTP test suite")
}
| go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/explorer.go | core/http/explorer.go | package http
import (
"io/fs"
"net/http"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/explorer"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/http/routes"
"github.com/mudler/xlog"
)
func Explorer(db *explorer.Database) *echo.Echo {
e := echo.New()
// Set ... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/app.go | core/http/app.go | package http
import (
"embed"
"errors"
"fmt"
"io/fs"
"net/http"
"os"
"path/filepath"
"strings"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/mudler/LocalAI/core/http/endpoints/localai"
httpMiddleware "github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/openai_mapping_test.go | core/http/openai_mapping_test.go | package http_test
import (
"encoding/json"
openai "github.com/mudler/LocalAI/core/http/endpoints/openai"
"github.com/mudler/LocalAI/core/schema"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
var _ = Describe("MapOpenAIToVideo", func() {
It("maps size and seconds correctly", func() {
cases := []... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/middleware/request.go | core/http/middleware/request.go | package middleware
import (
"context"
"encoding/json"
"fmt"
"net/http"
"strconv"
"strings"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/core/services"
"github.com/mudler/LocalAI/core/templa... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/middleware/middleware_suite_test.go | core/http/middleware/middleware_suite_test.go | package middleware_test
import (
"testing"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
func TestMiddleware(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Middleware test suite")
}
| go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/middleware/trace.go | core/http/middleware/trace.go | package middleware
import (
"bytes"
"github.com/emirpasic/gods/v2/queues/circularbuffer"
"io"
"net/http"
"sort"
"sync"
"time"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/application"
"github.com/mudler/xlog"
)
type APIExchangeRequest struct {
Method string `json:"method"`
Path ... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/middleware/strippathprefix.go | core/http/middleware/strippathprefix.go | package middleware
import (
"strings"
"github.com/labstack/echo/v4"
)
// StripPathPrefix returns middleware that strips a path prefix from the request path.
// The path prefix is obtained from the X-Forwarded-Prefix HTTP request header.
// This must be registered as Pre middleware (using e.Pre()) to modify the pat... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/middleware/auth.go | core/http/middleware/auth.go | package middleware
import (
"crypto/subtle"
"errors"
"net/http"
"strings"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/schema"
)
var ErrMissingOrMalformedAPIKey = errors.New("missing or malformed API Key")
// G... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/middleware/baseurl_test.go | core/http/middleware/baseurl_test.go | package middleware
import (
"net/http/httptest"
"github.com/labstack/echo/v4"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
var _ = Describe("BaseURL", func() {
Context("without prefix", func() {
It("should return base URL without prefix", func() {
app := echo.New()
actualURL := ""
// R... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/middleware/baseurl.go | core/http/middleware/baseurl.go | package middleware
import (
"strings"
"github.com/labstack/echo/v4"
)
// BaseURL returns the base URL for the given HTTP request context.
// It takes into account that the app may be exposed by a reverse-proxy under a different protocol, host and path.
// The returned URL is guaranteed to end with `/`.
// The meth... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/middleware/strippathprefix_test.go | core/http/middleware/strippathprefix_test.go | package middleware
import (
"net/http/httptest"
"github.com/labstack/echo/v4"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
var _ = Describe("StripPathPrefix", func() {
var app *echo.Echo
var actualPath string
var appInitialized bool
BeforeEach(func() {
actualPath = ""
if !appInitialized {
... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/edit_model.go | core/http/endpoints/localai/edit_model.go | package localai
import (
"fmt"
"io"
"net/http"
"os"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
httpUtils "github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/internal"
"github.com/mudler/LocalAI/pkg/utils"
"gopkg.in/yaml.v3"
)
// GetEditModelPage renders t... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/get_token_metrics.go | core/http/endpoints/localai/get_token_metrics.go | package localai
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/xlog"
"github.com/mudler/LocalAI/pkg/model"
)
// TODO: This is not... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/edit_model_test.go | core/http/endpoints/localai/edit_model_test.go | package localai_test
import (
"bytes"
"encoding/json"
"io"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
. "github.com/mudler/LocalAI/core/http/endpoints/localai"
"github.com/mudler/LocalAI/pkg/system"
. "github.com/onsi/ginkgo/v2... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/metrics.go | core/http/endpoints/localai/metrics.go | package localai
import (
"time"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/services"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
// LocalAIMetricsEndpoint returns the metrics endpoint for LocalAI
// @Summary Prometheus metrics endpoint
// @Param request body config.Gallery true... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/p2p.go | core/http/endpoints/localai/p2p.go | package localai
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/p2p"
"github.com/mudler/LocalAI/core/schema"
)
// ShowP2PNodes returns the P2P Nodes
// @Summary Returns available P2P nodes
// @Success 200 {object} []schema.P2PNodesResponse "Response"
... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/tts.go | core/http/endpoints/localai/tts.go | package localai
import (
"path/filepath"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/pkg/model"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/xlog"
"gi... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/types.go | core/http/endpoints/localai/types.go | package localai
// ModelResponse represents the common response structure for model operations
type ModelResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Filename string `json:"filename,omitempty"`
Config interface{} `json:"config,omitempty"`
Error string ... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/localai_suite_test.go | core/http/endpoints/localai/localai_suite_test.go | package localai_test
import (
"testing"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
func TestLocalAIEndpoints(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "LocalAI Endpoints test suite")
}
| go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/vad.go | core/http/endpoints/localai/vad.go | package localai
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg/model"
"github.com/mudler/xlog"
)
// VADEndpoint is Voi... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/detection.go | core/http/endpoints/localai/detection.go | package localai
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg/model"
"github.com/mudler/LocalAI/pkg/utils"
"github.co... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/mcp.go | core/http/endpoints/localai/mcp.go | package localai
import (
"context"
"encoding/json"
"errors"
"fmt"
"net"
"time"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
mcpTools "github.com/mudler/LocalAI/core/http/endpoints/mcp"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/settings.go | core/http/endpoints/localai/settings.go | package localai
import (
"encoding/json"
"io"
"net/http"
"os"
"path/filepath"
"time"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/application"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/p2p"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/xlog"
)
/... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/system.go | core/http/endpoints/localai/system.go | package localai
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg/model"
)
// SystemInformations returns the system informations
// @Summary Show the LocalAI instance information
// @Success 200 {object} schema.Sys... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/welcome.go | core/http/endpoints/localai/welcome.go | package localai
import (
"strings"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/gallery"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/services"
"github.com/mudler/LocalAI/internal"
"github.com/mudler/LocalAI/pkg/model... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/gallery.go | core/http/endpoints/localai/gallery.go | package localai
import (
"encoding/json"
"fmt"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/gallery"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/core/servi... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/tokenize.go | core/http/endpoints/localai/tokenize.go | package localai
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg/model"
)
// TokenizeEndpoint exposes a REST API to token... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/video.go | core/http/endpoints/localai/video.go | package localai
import (
"bufio"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"os"
"path/filepath"
"strings"
"time"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/Lo... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/stores.go | core/http/endpoints/localai/stores.go | package localai
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg/model"
"github.com/mudler/LocalAI/pkg/store"
)
func StoresSetEndpoint(sl *model.ModelLoader, appConfig *c... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/import_model.go | core/http/endpoints/localai/import_model.go | package localai
import (
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
"strings"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/gallery"
"github.com/mudler/LocalAI/core/gallery/importers"
httpUtils "github.com/mu... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/backend.go | core/http/endpoints/localai/backend.go | package localai
import (
"encoding/json"
"fmt"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/gallery"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/core/servi... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/agent_jobs.go | core/http/endpoints/localai/agent_jobs.go | package localai
import (
"fmt"
"net/http"
"strconv"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/application"
"github.com/mudler/LocalAI/core/schema"
)
// CreateTaskEndpoint creates a new agent task
// @Summary Create a new agent task
// @Description Create a new reusable agent task with promp... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/localai/backend_monitor.go | core/http/endpoints/localai/backend_monitor.go | package localai
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/core/services"
)
// BackendMonitorEndpoint returns the status of the specified backend
// @Summary Backend monitor endpoint
// @Param request body schema.BackendMonitorRequest true "Backend sta... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/inference.go | core/http/endpoints/openai/inference.go | package openai
import (
"encoding/json"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/schema"
model "github.com/mudler/LocalAI/pkg/model"
)
func ComputeChoices(
req *schema.OpenAIRequest,
predInput string,
config *config.ModelConfig,
bcl *c... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/constants.go | core/http/endpoints/openai/constants.go | package openai
// Finish reason constants for OpenAI API responses
const (
FinishReasonStop = "stop"
FinishReasonToolCalls = "tool_calls"
FinishReasonFunctionCall = "function_call"
)
| go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/edit.go | core/http/endpoints/openai/edit.go | package openai
import (
"encoding/json"
"time"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/google/uuid"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/core/tem... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/image.go | core/http/endpoints/openai/image.go | package openai
import (
"bufio"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"os"
"path/filepath"
"strconv"
"strings"
"time"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/realtime_model.go | core/http/endpoints/openai/realtime_model.go | package openai
import (
"context"
"fmt"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
grpcClient "github.com/mudler/LocalAI/pkg/grpc"
"github.com/mudler/LocalAI/pkg/grpc/proto"
model "github.com/mudler/LocalAI/pkg/model"
"github.com/mudler/xlog"
"google.golang.org/grpc"
)
... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/realtime.go | core/http/endpoints/openai/realtime.go | package openai
import (
"context"
"encoding/base64"
"encoding/json"
"fmt"
"os"
"strings"
"sync"
"time"
"net/http"
"github.com/go-audio/audio"
"github.com/gorilla/websocket"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/application"
"github.com/mudler/LocalAI/core/config"
"github.com/mu... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | true |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/transcription.go | core/http/endpoints/openai/transcription.go | package openai
import (
"io"
"net/http"
"os"
"path"
"path/filepath"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
model "github.com/mudler/LocalAI/pkg/mo... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/video.go | core/http/endpoints/openai/video.go | package openai
import (
"encoding/json"
"fmt"
"strconv"
"strings"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/endpoints/localai"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
model "github.com/mudler/Lo... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/list.go | core/http/endpoints/openai/list.go | package openai
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/core/services"
model "github.com/mudler/LocalAI/pkg/model"
)
// ListModelsEndpoint is the OpenAI Models API endpoint https://platform.openai.com/docs/ap... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/completion.go | core/http/endpoints/openai/completion.go | package openai
import (
"encoding/json"
"errors"
"fmt"
"time"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/google/uuid"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/inpainting.go | core/http/endpoints/openai/inpainting.go | package openai
import (
"encoding/base64"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"os"
"path/filepath"
"strconv"
"time"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
"github.com/mudler/xlog"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/chat.go | core/http/endpoints/openai/chat.go | package openai
import (
"encoding/json"
"fmt"
"time"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/inpainting_test.go | core/http/endpoints/openai/inpainting_test.go | package openai
import (
"bytes"
"mime/multipart"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"testing"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
model "github.com/mudler/LocalAI/pk... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/embeddings.go | core/http/endpoints/openai/embeddings.go | package openai
import (
"encoding/json"
"time"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/pkg/model"
"github.com/google/uuid"
"github.com/mudler/LocalAI/core/schema... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/openai/types/realtime.go | core/http/endpoints/openai/types/realtime.go | package types
// Most of this file was coppied from https://github.com/WqyJh/go-openai-realtime
// Copyright (c) 2024 Qiying Wang MIT License
import (
"encoding/json"
"fmt"
"math"
)
const (
// Inf is the maximum value for an IntOrInf.
Inf IntOrInf = math.MaxInt
)
// IntOrInf is a type that can be either an int... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | true |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/explorer/dashboard.go | core/http/endpoints/explorer/dashboard.go | package explorer
import (
"encoding/base64"
"net/http"
"sort"
"strings"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/explorer"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/internal"
)
func Dashboard() echo.HandlerFunc {
return func(c echo.Context) error {
su... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/elevenlabs/soundgeneration.go | core/http/endpoints/elevenlabs/soundgeneration.go | package elevenlabs
import (
"path/filepath"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg/model"
"github.com/mudler/xlog"
)
... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/elevenlabs/tts.go | core/http/endpoints/elevenlabs/tts.go | package elevenlabs
import (
"path/filepath"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg/model"
"github.com/mudler/xlog"
)
... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/jina/rerank.go | core/http/endpoints/jina/rerank.go | package jina
import (
"net/http"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/backend"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg/grpc/proto"
"github.com/mudler/LocalAI/pkg/mod... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/endpoints/mcp/tools.go | core/http/endpoints/mcp/tools.go | package mcp
import (
"context"
"net/http"
"os"
"os/exec"
"sync"
"time"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/pkg/signals"
"github.com/modelcontextprotocol/go-sdk/mcp"
"github.com/mudler/xlog"
)
type sessionCache struct {
mu sync.Mutex
cache map[string][]*mcp.ClientSession... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/routes/health.go | core/http/routes/health.go | package routes
import (
"github.com/labstack/echo/v4"
)
func HealthRoutes(app *echo.Echo) {
// Service health checks
ok := func(c echo.Context) error {
return c.NoContent(200)
}
app.GET("/healthz", ok)
app.GET("/readyz", ok)
}
| go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/routes/jina.go | core/http/routes/jina.go | package routes
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/endpoints/jina"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg/model"
)
func RegisterJINARoutes(app *echo.E... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/routes/ui_gallery.go | core/http/routes/ui_gallery.go | package routes
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/services"
"github.com/mudler/LocalAI/internal"
)
func registerGalleryRoutes(app *echo.Echo, cl *config.ModelConfigLoader, appConfig *confi... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/routes/ui_backend_gallery.go | core/http/routes/ui_backend_gallery.go | package routes
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/services"
"github.com/mudler/LocalAI/internal"
)
func registerBackendGalleryRoutes(app *echo.Echo, appConfig *config.ApplicationConfig, ga... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/routes/ui_api.go | core/http/routes/ui_api.go | package routes
import (
"context"
"fmt"
"math"
"net/http"
"net/url"
"sort"
"strconv"
"strings"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/application"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/gallery"
"github.com/mudler/LocalAI/c... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/routes/elevenlabs.go | core/http/routes/elevenlabs.go | package routes
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/endpoints/elevenlabs"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg/model"
)
func RegisterElevenLabsRoutes(... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/routes/ui.go | core/http/routes/ui.go | package routes
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/gallery"
"github.com/mudler/LocalAI/core/http/endpoints/localai"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/services"
"github.com/mudler/LocalAI/int... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/routes/ui_api_backends_test.go | core/http/routes/ui_api_backends_test.go | package routes_test
import (
"bytes"
"context"
"encoding/json"
"io"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"testing"
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/gallery"
"github.com/mudler/LocalAI/core/http/routes"
"github.com/mudler... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/routes/openai.go | core/http/routes/openai.go | package routes
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/application"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/endpoints/localai"
"github.com/mudler/LocalAI/core/http/endpoints/openai"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/m... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/routes/explorer.go | core/http/routes/explorer.go | package routes
import (
"github.com/labstack/echo/v4"
coreExplorer "github.com/mudler/LocalAI/core/explorer"
"github.com/mudler/LocalAI/core/http/endpoints/explorer"
)
func RegisterExplorerRoutes(app *echo.Echo, db *coreExplorer.Database) {
app.GET("/", explorer.Dashboard())
app.POST("/network/add", explorer.Add... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/http/routes/localai.go | core/http/routes/localai.go | package routes
import (
"github.com/labstack/echo/v4"
"github.com/mudler/LocalAI/core/application"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/http/endpoints/localai"
"github.com/mudler/LocalAI/core/http/middleware"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/c... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/startup/model_preload_test.go | core/startup/model_preload_test.go | package startup_test
import (
"context"
"fmt"
"os"
"path/filepath"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/services"
. "github.com/mudler/LocalAI/core/startup"
"github.com/mudler/LocalAI/pkg/model"
"github.com/mudler/LocalAI/pkg/system"
. "github.com/onsi/ginkgo/v2"
. "gith... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/startup/startup_suite_test.go | core/startup/startup_suite_test.go | package startup_test
import (
"testing"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
func TestStartup(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "LocalAI startup test")
}
| go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
mudler/LocalAI | https://github.com/mudler/LocalAI/blob/23df29fbd3eec1af3944521205fd62b20d4149e5/core/startup/model_preload.go | core/startup/model_preload.go | package startup
import (
"context"
"encoding/json"
"errors"
"fmt"
"time"
"github.com/google/uuid"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/gallery"
"github.com/mudler/LocalAI/core/gallery/importers"
"github.com/mudler/LocalAI/core/services"
"github.com/mudler/LocalAI/pkg/mode... | go | MIT | 23df29fbd3eec1af3944521205fd62b20d4149e5 | 2026-01-07T08:35:47.749878Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/mocks.go | mocks.go | package core
//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/io.go -mock_names Reader=Reader,Writer=Writer io Reader,Writer
//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/log.go -mock_names Handler=LogHandler v2ray.com/core/co... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/errors.generated.go | errors.generated.go | package core
import "v2ray.com/core/common/errors"
type errPathObjHolder struct{}
func newError(values ...interface{}) *errors.Error {
return errors.New(values...).WithPathObj(errPathObjHolder{})
}
| go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/annotations.go | annotations.go | package core
// Annotation is a concept in V2Ray. This struct is only for documentation. It is not used anywhere.
// Annotations begin with "v2ray:" in comment, as metadata of functions or types.
type Annotation struct {
// API is for types or functions that can be used in other libs. Possible values are:
//
// * v... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/proto.go | proto.go | package core
//go:generate go install -v google.golang.org/protobuf/cmd/protoc-gen-go
//go:generate go install -v google.golang.org/grpc/cmd/protoc-gen-go-grpc
//go:generate go install -v github.com/gogo/protobuf/protoc-gen-gofast
//go:generate go run ./infra/vprotogen/main.go
import "path/filepath"
// ProtoFilesUsi... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/context_test.go | context_test.go | package core_test
import (
"context"
"testing"
. "v2ray.com/core"
)
func TestContextPanic(t *testing.T) {
defer func() {
r := recover()
if r == nil {
t.Error("expect panic, but nil")
}
}()
MustFromContext(context.Background())
}
| go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/config.go | config.go | // +build !confonly
package core
import (
"io"
"strings"
"github.com/golang/protobuf/proto"
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/cmdarg"
"v2ray.com/core/main/confloader"
)
// ConfigFormat is a configurable format of V2Ray config file.
type ConfigFormat struct {
Name ... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/v2ray.go | v2ray.go | // +build !confonly
package core
import (
"context"
"reflect"
"sync"
"v2ray.com/core/common"
"v2ray.com/core/common/serial"
"v2ray.com/core/features"
"v2ray.com/core/features/dns"
"v2ray.com/core/features/dns/localdns"
"v2ray.com/core/features/inbound"
"v2ray.com/core/features/outbound"
"v2ray.com/core/fe... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/v2ray_test.go | v2ray_test.go | package core_test
import (
"testing"
proto "github.com/golang/protobuf/proto"
. "v2ray.com/core"
"v2ray.com/core/app/dispatcher"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/common/uuid"
"v2... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/context.go | context.go | // +build !confonly
package core
import (
"context"
)
// V2rayKey is the key type of Instance in Context, exported for test.
type V2rayKey int
const v2rayKey V2rayKey = 1
// FromContext returns an Instance from the given context, or nil if the context doesn't contain one.
func FromContext(ctx context.Context) *In... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/config.pb.go | config.pb.go | // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.13.0
// source: config.proto
package core
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/proto... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/functions.go | functions.go | // +build !confonly
package core
import (
"bytes"
"context"
"v2ray.com/core/common"
"v2ray.com/core/common/net"
"v2ray.com/core/features/routing"
"v2ray.com/core/transport/internet/udp"
)
// CreateObject creates a new object based on the given V2Ray instance and config. The V2Ray instance may be nil.
func Cre... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/core.go | core.go | // Package core provides an entry point to use V2Ray core functionalities.
//
// V2Ray makes it possible to accept incoming network connections with certain
// protocol, process the data, and send them through another connection with
// the same or a difference protocol on demand.
//
// It may be configured to work wit... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | true |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/functions_test.go | functions_test.go | package core_test
import (
"context"
"crypto/rand"
"io"
"testing"
"time"
"github.com/golang/protobuf/proto"
"github.com/google/go-cmp/cmp"
"v2ray.com/core"
"v2ray.com/core/app/dispatcher"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
"v2ray.com/core/common/net"
"v2ray.com/core/common/serial"
"v... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/app.go | app/app.go | // Package app contains feature implementations of V2Ray. The features may be enabled during runtime.
package app
| go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/dispatcher/default.go | app/dispatcher/default.go | // +build !confonly
package dispatcher
//go:generate go run v2ray.com/core/common/errors/errorgen
import (
"context"
"strings"
"sync"
"time"
"v2ray.com/core"
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/dispatcher/stats.go | app/dispatcher/stats.go | // +build !confonly
package dispatcher
import (
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
"v2ray.com/core/features/stats"
)
type SizeStatWriter struct {
Counter stats.Counter
Writer buf.Writer
}
func (w *SizeStatWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
w.Counter.Add(int64(mb.Len()))
re... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/dispatcher/errors.generated.go | app/dispatcher/errors.generated.go | package dispatcher
import "v2ray.com/core/common/errors"
type errPathObjHolder struct{}
func newError(values ...interface{}) *errors.Error {
return errors.New(values...).WithPathObj(errPathObjHolder{})
}
| go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/dispatcher/sniffer.go | app/dispatcher/sniffer.go | // +build !confonly
package dispatcher
import (
"v2ray.com/core/common"
"v2ray.com/core/common/protocol/bittorrent"
"v2ray.com/core/common/protocol/http"
"v2ray.com/core/common/protocol/tls"
)
type SniffResult interface {
Protocol() string
Domain() string
}
type protocolSniffer func([]byte) (SniffResult, erro... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/dispatcher/stats_test.go | app/dispatcher/stats_test.go | package dispatcher_test
import (
"testing"
. "v2ray.com/core/app/dispatcher"
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
)
type TestCounter int64
func (c *TestCounter) Value() int64 {
return int64(*c)
}
func (c *TestCounter) Add(v int64) int64 {
x := int64(*c) + v
*c = TestCounter(x)
return x
}
fu... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/dispatcher/dispatcher.go | app/dispatcher/dispatcher.go | // +build !confonly
package dispatcher
//go:generate go run v2ray.com/core/common/errors/errorgen
| go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/dispatcher/config.pb.go | app/dispatcher/config.pb.go | // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.13.0
// source: app/dispatcher/config.proto
package dispatcher
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/p... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/reverse/reverse.go | app/reverse/reverse.go | // +build !confonly
package reverse
//go:generate go run v2ray.com/core/common/errors/errorgen
import (
"context"
"v2ray.com/core"
"v2ray.com/core/common"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/net"
"v2ray.com/core/features/outbound"
"v2ray.com/core/features/routing"
)
const (
internalDomain... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/reverse/errors.generated.go | app/reverse/errors.generated.go | package reverse
import "v2ray.com/core/common/errors"
type errPathObjHolder struct{}
func newError(values ...interface{}) *errors.Error {
return errors.New(values...).WithPathObj(errPathObjHolder{})
}
| go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/reverse/portal.go | app/reverse/portal.go | // +build !confonly
package reverse
import (
"context"
"sync"
"time"
"github.com/golang/protobuf/proto"
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/mux"
"v2ray.com/core/common/net"
"v2ray.com/core/common/session"
"v2ray.com/core/common/task"
"v2ray.com/core/features/outbound... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/reverse/config.go | app/reverse/config.go | // +build !confonly
package reverse
import (
"crypto/rand"
"io"
"v2ray.com/core/common/dice"
)
func (c *Control) FillInRandom() {
randomLength := dice.Roll(64)
c.Random = make([]byte, randomLength)
io.ReadFull(rand.Reader, c.Random)
}
| go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
v2ray/v2ray-core | https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/app/reverse/bridge.go | app/reverse/bridge.go | // +build !confonly
package reverse
import (
"context"
"time"
"github.com/golang/protobuf/proto"
"v2ray.com/core/common/mux"
"v2ray.com/core/common/net"
"v2ray.com/core/common/session"
"v2ray.com/core/common/task"
"v2ray.com/core/features/routing"
"v2ray.com/core/transport"
"v2ray.com/core/transport/pipe"
... | go | MIT | d80440f3d57b45c829dbf513306f7adf9a0f3f76 | 2026-01-07T08:35:44.381088Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.