Rebrand project
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Go LLM Gateway
|
# latticelm
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ Instead of managing multiple SDK integrations in your application, call one endp
|
|||||||
```
|
```
|
||||||
Client Request
|
Client Request
|
||||||
↓
|
↓
|
||||||
Go LLM Gateway (unified API)
|
latticelm (unified API)
|
||||||
↓
|
↓
|
||||||
├─→ OpenAI SDK
|
├─→ OpenAI SDK
|
||||||
├─→ Azure OpenAI (OpenAI SDK + Azure auth)
|
├─→ Azure OpenAI (OpenAI SDK + Azure auth)
|
||||||
@@ -68,7 +68,7 @@ export ANTHROPIC_API_KEY="your-key"
|
|||||||
export GOOGLE_API_KEY="your-key"
|
export GOOGLE_API_KEY="your-key"
|
||||||
|
|
||||||
# 2. Build
|
# 2. Build
|
||||||
cd go-llm-gateway
|
cd latticelm
|
||||||
go build -o gateway ./cmd/gateway
|
go build -o gateway ./cmd/gateway
|
||||||
|
|
||||||
# 3. Run
|
# 3. Run
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ import (
|
|||||||
_ "github.com/jackc/pgx/v5/stdlib"
|
_ "github.com/jackc/pgx/v5/stdlib"
|
||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
|
|
||||||
"github.com/yourusername/go-llm-gateway/internal/auth"
|
"github.com/ajac-zero/latticelm/internal/auth"
|
||||||
"github.com/yourusername/go-llm-gateway/internal/config"
|
"github.com/ajac-zero/latticelm/internal/config"
|
||||||
"github.com/yourusername/go-llm-gateway/internal/conversation"
|
"github.com/ajac-zero/latticelm/internal/conversation"
|
||||||
"github.com/yourusername/go-llm-gateway/internal/providers"
|
"github.com/ajac-zero/latticelm/internal/providers"
|
||||||
"github.com/yourusername/go-llm-gateway/internal/server"
|
"github.com/ajac-zero/latticelm/internal/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
|||||||
module github.com/yourusername/go-llm-gateway
|
module github.com/ajac-zero/latticelm
|
||||||
|
|
||||||
go 1.25.7
|
go 1.25.7
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/yourusername/go-llm-gateway/internal/api"
|
"github.com/ajac-zero/latticelm/internal/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Store defines the interface for conversation storage backends.
|
// Store defines the interface for conversation storage backends.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/yourusername/go-llm-gateway/internal/api"
|
"github.com/ajac-zero/latticelm/internal/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// sqlDialect holds driver-specific SQL statements.
|
// sqlDialect holds driver-specific SQL statements.
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"github.com/anthropics/anthropic-sdk-go"
|
"github.com/anthropics/anthropic-sdk-go"
|
||||||
"github.com/anthropics/anthropic-sdk-go/option"
|
"github.com/anthropics/anthropic-sdk-go/option"
|
||||||
|
|
||||||
"github.com/yourusername/go-llm-gateway/internal/api"
|
"github.com/ajac-zero/latticelm/internal/api"
|
||||||
"github.com/yourusername/go-llm-gateway/internal/config"
|
"github.com/ajac-zero/latticelm/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
const Name = "anthropic"
|
const Name = "anthropic"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"google.golang.org/genai"
|
"google.golang.org/genai"
|
||||||
|
|
||||||
"github.com/yourusername/go-llm-gateway/internal/api"
|
"github.com/ajac-zero/latticelm/internal/api"
|
||||||
"github.com/yourusername/go-llm-gateway/internal/config"
|
"github.com/ajac-zero/latticelm/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
const Name = "google"
|
const Name = "google"
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"github.com/openai/openai-go/azure"
|
"github.com/openai/openai-go/azure"
|
||||||
"github.com/openai/openai-go/option"
|
"github.com/openai/openai-go/option"
|
||||||
|
|
||||||
"github.com/yourusername/go-llm-gateway/internal/api"
|
"github.com/ajac-zero/latticelm/internal/api"
|
||||||
"github.com/yourusername/go-llm-gateway/internal/config"
|
"github.com/ajac-zero/latticelm/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
const Name = "openai"
|
const Name = "openai"
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/yourusername/go-llm-gateway/internal/api"
|
"github.com/ajac-zero/latticelm/internal/api"
|
||||||
"github.com/yourusername/go-llm-gateway/internal/config"
|
"github.com/ajac-zero/latticelm/internal/config"
|
||||||
anthropicprovider "github.com/yourusername/go-llm-gateway/internal/providers/anthropic"
|
anthropicprovider "github.com/ajac-zero/latticelm/internal/providers/anthropic"
|
||||||
googleprovider "github.com/yourusername/go-llm-gateway/internal/providers/google"
|
googleprovider "github.com/ajac-zero/latticelm/internal/providers/google"
|
||||||
openaiprovider "github.com/yourusername/go-llm-gateway/internal/providers/openai"
|
openaiprovider "github.com/ajac-zero/latticelm/internal/providers/openai"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Provider represents a unified interface that each LLM provider must implement.
|
// Provider represents a unified interface that each LLM provider must implement.
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
|
||||||
"github.com/yourusername/go-llm-gateway/internal/api"
|
"github.com/ajac-zero/latticelm/internal/api"
|
||||||
"github.com/yourusername/go-llm-gateway/internal/conversation"
|
"github.com/ajac-zero/latticelm/internal/conversation"
|
||||||
"github.com/yourusername/go-llm-gateway/internal/providers"
|
"github.com/ajac-zero/latticelm/internal/providers"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GatewayServer hosts the Open Responses API for the gateway.
|
// GatewayServer hosts the Open Responses API for the gateway.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# ///
|
# ///
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Terminal chat interface for go-llm-gateway.
|
Terminal chat interface for latticelm.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
python chat.py
|
python chat.py
|
||||||
@@ -119,7 +119,7 @@ def print_models_table(client: OpenAI):
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description="Chat with go-llm-gateway")
|
parser = argparse.ArgumentParser(description="Chat with latticelm")
|
||||||
parser.add_argument("--url", default="http://localhost:8080", help="Gateway URL")
|
parser.add_argument("--url", default="http://localhost:8080", help="Gateway URL")
|
||||||
parser.add_argument("--model", default=None, help="Model to use (defaults to first available)")
|
parser.add_argument("--model", default=None, help="Model to use (defaults to first available)")
|
||||||
parser.add_argument("--token", help="Auth token (Bearer)")
|
parser.add_argument("--token", help="Auth token (Bearer)")
|
||||||
@@ -148,7 +148,7 @@ def main():
|
|||||||
|
|
||||||
# Welcome banner
|
# Welcome banner
|
||||||
console.print(Panel.fit(
|
console.print(Panel.fit(
|
||||||
"[bold cyan]go-llm-gateway Chat Interface[/bold cyan]\n"
|
"[bold cyan]latticelm Chat Interface[/bold cyan]\n"
|
||||||
f"Connected to: [green]{args.url}[/green]\n"
|
f"Connected to: [green]{args.url}[/green]\n"
|
||||||
f"Model: [yellow]{current_model}[/yellow]\n"
|
f"Model: [yellow]{current_model}[/yellow]\n"
|
||||||
f"Streaming: [{'green' if stream_enabled else 'red'}]{stream_enabled}[/]\n\n"
|
f"Streaming: [{'green' if stream_enabled else 'red'}]{stream_enabled}[/]\n\n"
|
||||||
|
|||||||
4
tests/package-lock.json
generated
4
tests/package-lock.json
generated
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "go-llm-gateway-compliance-tests",
|
"name": "latticelm-compliance-tests",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "go-llm-gateway-compliance-tests",
|
"name": "latticelm-compliance-tests",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.0.0",
|
"@types/node": "^22.0.0",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "go-llm-gateway-compliance-tests",
|
"name": "latticelm-compliance-tests",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Open Responses compliance tests for go-llm-gateway",
|
"description": "Open Responses compliance tests for latticelm",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test:compliance": "node --experimental-strip-types bin/compliance-test.ts",
|
"test:compliance": "node --experimental-strip-types bin/compliance-test.ts",
|
||||||
|
|||||||
Reference in New Issue
Block a user