Skip to content

Commit

Permalink
🔧 Use github.com/EinStack/glide as module name to support go install cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest authored May 1, 2024
1 parent cf137da commit 2db285c
Show file tree
Hide file tree
Showing 78 changed files with 261 additions and 188 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module glide
module github.com/EinStack/glide

go 1.22.1

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"log"

"glide/pkg/cmd"
"github.com/EinStack/glide/pkg/cmd"
)

// @title Glide
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package api

import "glide/pkg/api/http"
import "github.com/EinStack/glide/pkg/api/http"

// Config defines configuration for all API types we support (e.g. HTTP, gRPC)
type Config struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/http/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"time"

"github.com/EinStack/glide/pkg/version"
"github.com/gofiber/fiber/v2"
"glide/pkg/version"
)

type ServerConfig struct {
Expand Down
8 changes: 5 additions & 3 deletions pkg/api/http/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import (
"errors"
"sync"

"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"
"go.uber.org/zap"

"github.com/EinStack/glide/pkg/routers"

"github.com/EinStack/glide/pkg/api/schemas"

"github.com/gofiber/contrib/websocket"
"github.com/gofiber/fiber/v2"
"glide/pkg/api/schemas"
"glide/pkg/routers"
)

type Handler = func(c *fiber.Ctx) error
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/http/schemas.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package http

import "glide/pkg/routers"
import "github.com/EinStack/glide/pkg/routers"

type ErrorSchema struct {
Message string `json:"message"`
Expand Down
9 changes: 5 additions & 4 deletions pkg/api/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ import (

"github.com/gofiber/swagger"

"glide/docs"
"github.com/EinStack/glide/docs"

"github.com/gofiber/contrib/fiberzap/v2"

_ "github.com/EinStack/glide/docs" // importing docs package to include them into the binary

"github.com/gofiber/fiber/v2"
_ "glide/docs" // importing docs package to include them into the binary

"glide/pkg/routers"
"github.com/EinStack/glide/pkg/routers"

"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"
)

type Server struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (

"go.uber.org/zap"

"glide/pkg/routers"
"github.com/EinStack/glide/pkg/routers"

"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"

"glide/pkg/api/http"
"github.com/EinStack/glide/pkg/api/http"
)

type ServerManager struct {
Expand Down
10 changes: 6 additions & 4 deletions pkg/cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package cmd
import (
"log"

"glide/pkg/version"
"github.com/EinStack/glide/pkg/version"

"github.com/EinStack/glide/pkg/config"

"github.com/EinStack/glide/pkg"

"github.com/spf13/cobra"
"glide/pkg"
"glide/pkg/config"
)

var (
Expand Down Expand Up @@ -37,7 +39,7 @@ to make your LLM applications production ready 🎉
func NewCLI() *cobra.Command {
// TODO: Chances are we could use the build in flags module in this is all we need from CLI
cli := &cobra.Command{
Use: "glide",
Use: "github.com/EinStack/glide",
Short: "🐦Glide is an open-source, lightweight, high-performance model gateway",
Long: Description,
Version: version.FullVersion,
Expand Down
8 changes: 5 additions & 3 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package config

import (
"glide/pkg/api"
"glide/pkg/routers"
"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"

"github.com/EinStack/glide/pkg/routers"

"github.com/EinStack/glide/pkg/api"
)

// Config is a general top-level Glide configuration
Expand Down
11 changes: 6 additions & 5 deletions pkg/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ import (
"os/signal"
"syscall"

"glide/pkg/version"
"github.com/EinStack/glide/pkg/routers"
"github.com/EinStack/glide/pkg/version"

"glide/pkg/routers"
"github.com/EinStack/glide/pkg/config"

"glide/pkg/config"
"github.com/EinStack/glide/pkg/telemetry"

"glide/pkg/telemetry"
"go.uber.org/zap"

"glide/pkg/api"
"github.com/EinStack/glide/pkg/api"

"go.uber.org/multierr"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/anthropic/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/http"
"time"

"glide/pkg/api/schemas"
"github.com/EinStack/glide/pkg/api/schemas"
"go.uber.org/zap"
)

Expand Down
5 changes: 3 additions & 2 deletions pkg/providers/anthropic/chat_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package anthropic
import (
"context"

"glide/pkg/api/schemas"
"glide/pkg/providers/clients"
"github.com/EinStack/glide/pkg/providers/clients"

"github.com/EinStack/glide/pkg/api/schemas"
)

func (c *Client) SupportChatStream() bool {
Expand Down
5 changes: 3 additions & 2 deletions pkg/providers/anthropic/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"net/http"
"net/url"

"glide/pkg/providers/clients"
"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"

"github.com/EinStack/glide/pkg/providers/clients"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions pkg/providers/anthropic/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"path/filepath"
"testing"

"glide/pkg/providers/clients"
"github.com/EinStack/glide/pkg/providers/clients"

"glide/pkg/api/schemas"
"github.com/EinStack/glide/pkg/api/schemas"

"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"

"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/anthropic/config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package anthropic

import (
"glide/pkg/config/fields"
"github.com/EinStack/glide/pkg/config/fields"
)

// Params defines OpenAI-specific model params with the specific validation of values
Expand Down
5 changes: 3 additions & 2 deletions pkg/providers/anthropic/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"net/http"
"time"

"glide/pkg/providers/clients"
"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"

"github.com/EinStack/glide/pkg/providers/clients"
"go.uber.org/zap"
)

Expand Down
5 changes: 3 additions & 2 deletions pkg/providers/azureopenai/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
"io"
"net/http"

"glide/pkg/api/schemas"
"glide/pkg/providers/openai"
"github.com/EinStack/glide/pkg/providers/openai"

"github.com/EinStack/glide/pkg/api/schemas"

"go.uber.org/zap"
)
Expand Down
10 changes: 6 additions & 4 deletions pkg/providers/azureopenai/chat_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ import (
"io"
"net/http"

"github.com/EinStack/glide/pkg/telemetry"

"github.com/EinStack/glide/pkg/providers/openai"

"github.com/EinStack/glide/pkg/providers/clients"
"github.com/r3labs/sse/v2"
"glide/pkg/providers/clients"
"glide/pkg/providers/openai"
"glide/pkg/telemetry"

"go.uber.org/zap"

"glide/pkg/api/schemas"
"github.com/EinStack/glide/pkg/api/schemas"
)

// TODO: Think about reducing the number of copy-pasted code btw OpenAI and Azure providers
Expand Down
7 changes: 4 additions & 3 deletions pkg/providers/azureopenai/chat_stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import (
"path/filepath"
"testing"

"glide/pkg/api/schemas"
"github.com/EinStack/glide/pkg/api/schemas"

"glide/pkg/providers/clients"
"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"

"github.com/EinStack/glide/pkg/providers/clients"

"github.com/stretchr/testify/require"
)
Expand Down
7 changes: 4 additions & 3 deletions pkg/providers/azureopenai/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"fmt"
"net/http"

"glide/pkg/providers/openai"
"github.com/EinStack/glide/pkg/providers/openai"

"glide/pkg/providers/clients"
"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"

"github.com/EinStack/glide/pkg/providers/clients"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions pkg/providers/azureopenai/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"path/filepath"
"testing"

"glide/pkg/providers/clients"
"github.com/EinStack/glide/pkg/providers/clients"

"glide/pkg/api/schemas"
"github.com/EinStack/glide/pkg/api/schemas"

"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"

"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/azureopenai/config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package azureopenai

import (
"glide/pkg/config/fields"
"github.com/EinStack/glide/pkg/config/fields"
)

// Params defines OpenAI-specific model params with the specific validation of values
Expand Down
5 changes: 3 additions & 2 deletions pkg/providers/azureopenai/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"net/http"
"time"

"glide/pkg/providers/clients"
"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"

"github.com/EinStack/glide/pkg/providers/clients"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/bedrock/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"time"

"glide/pkg/api/schemas"
"github.com/EinStack/glide/pkg/api/schemas"

"go.uber.org/zap"

Expand Down
5 changes: 3 additions & 2 deletions pkg/providers/bedrock/chat_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package bedrock
import (
"context"

"glide/pkg/api/schemas"
"glide/pkg/providers/clients"
"github.com/EinStack/glide/pkg/providers/clients"

"github.com/EinStack/glide/pkg/api/schemas"
)

func (c *Client) SupportChatStream() bool {
Expand Down
5 changes: 3 additions & 2 deletions pkg/providers/bedrock/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"net/http"
"net/url"

"glide/pkg/providers/clients"
"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"

"github.com/EinStack/glide/pkg/providers/clients"

"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
Expand Down
6 changes: 3 additions & 3 deletions pkg/providers/bedrock/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"path/filepath"
"testing"

"glide/pkg/providers/clients"
"github.com/EinStack/glide/pkg/providers/clients"

"glide/pkg/api/schemas"
"github.com/EinStack/glide/pkg/api/schemas"

"glide/pkg/telemetry"
"github.com/EinStack/glide/pkg/telemetry"

"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/bedrock/config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package bedrock

import (
"glide/pkg/config/fields"
"github.com/EinStack/glide/pkg/config/fields"
)

// Params defines OpenAI-specific model params with the specific validation of values
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/clients/stream.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package clients

import (
"glide/pkg/api/schemas"
"github.com/EinStack/glide/pkg/api/schemas"
)

type ChatStream interface {
Expand Down
Loading

0 comments on commit 2db285c

Please sign in to comment.