diff --git a/frontend/src/app/llm/page.tsx b/frontend/src/app/llm/page.tsx index 766f7be..7789842 100644 --- a/frontend/src/app/llm/page.tsx +++ b/frontend/src/app/llm/page.tsx @@ -18,7 +18,6 @@ import { Plus, Settings, Trash2, - Copy, Calendar, Lock, Unlock, @@ -187,15 +186,6 @@ function LLMPageContent() { } } - const copyToClipboard = (text: string, type: string = "API key") => { - navigator.clipboard.writeText(text) - toast({ - title: "Copied!", - description: `${type} copied to clipboard` - }) - } - - const formatCurrency = (cents: number) => { return `$${(cents / 100).toFixed(4)}` } @@ -205,21 +195,6 @@ function LLMPageContent() { return new Date(dateStr).toLocaleDateString() } - - // Get the public API URL from the current window location - const getPublicApiUrl = () => { - if (typeof window !== 'undefined') { - const protocol = window.location.protocol - const hostname = window.location.hostname - const port = window.location.port || (protocol === 'https:' ? '443' : '80') - const portSuffix = (protocol === 'https:' && port === '443') || (protocol === 'http:' && port === '80') ? '' : `:${port}` - return `${protocol}//${hostname}${portSuffix}/api/v1` - } - return 'http://localhost/api/v1' - } - - const publicApiUrl = getPublicApiUrl() - return (
@@ -229,77 +204,6 @@ function LLMPageContent() {

- {/* Public API URL Display */} - - - - - OpenAI-Compatible API Configuration - - - Use this endpoint URL to configure external tools like Open WebUI, Continue.dev, or any OpenAI-compatible client. - - - -
-
- -
- - {publicApiUrl} - - -
-
- -
-
-

Available Endpoints:

-
    -
  • GET /v1/models - List available models
  • -
  • POST /v1/chat/completions - Chat completions
  • -
  • POST /v1/embeddings - Text embeddings
  • -
-
- -
-

Configuration Example:

-
-
Base URL: {publicApiUrl}
-
API Key: ce_your_api_key
-
Model: gpt-3.5-turbo
-
-
-
- -
-
- -
- Setup Instructions: -
- 1. Copy the API Base URL above -
- 2. Create an API key in the "API Keys" tab below -
- 3. Use both in your OpenAI-compatible client configuration -
- 4. Do NOT append additional paths like "/models" - clients handle this automatically -
-
-
-
-
-
- API Keys