feat: update Ollama endpoint and dashboard
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ services:
|
|||||||
- /opt/agent-os:/opt/agent-os
|
- /opt/agent-os:/opt/agent-os
|
||||||
- /opt/sites:/opt/sites
|
- /opt/sites:/opt/sites
|
||||||
environment:
|
environment:
|
||||||
OLLAMA_URL: http://172.27.6.139:11434
|
OLLAMA_URL: http://172.27.40.20:11434
|
||||||
OLLAMA_MODEL: gemma4
|
OLLAMA_MODEL: gemma4
|
||||||
SEARXNG_URL: http://searxng:8080
|
SEARXNG_URL: http://searxng:8080
|
||||||
SITES_DIR: /opt/sites
|
SITES_DIR: /opt/sites
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ logger = logging.getLogger("sam")
|
|||||||
|
|
||||||
app = FastAPI(title="sam-research", version="0.1.0")
|
app = FastAPI(title="sam-research", version="0.1.0")
|
||||||
|
|
||||||
OLLAMA_URL = os.getenv("OLLAMA_URL", "http://172.27.6.139:11434")
|
OLLAMA_URL = os.getenv("OLLAMA_URL", "http://172.27.40.20:11434")
|
||||||
OLLAMA_MODEL = os.getenv("OLLAMA_MODEL", "gemma4")
|
OLLAMA_MODEL = os.getenv("OLLAMA_MODEL", "gemma4")
|
||||||
SEARXNG_URL = os.getenv("SEARXNG_URL", "http://searxng:8080")
|
SEARXNG_URL = os.getenv("SEARXNG_URL", "http://searxng:8080")
|
||||||
SITES_DIR = Path(os.getenv("SITES_DIR", "/opt/sites"))
|
SITES_DIR = Path(os.getenv("SITES_DIR", "/opt/sites"))
|
||||||
@@ -134,24 +134,44 @@ def render_html(history: list[dict]) -> str:
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>Sam — Research</title>
|
<title>Sam — Research</title>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
|
||||||
<style>
|
<style>
|
||||||
* {{ box-sizing: border-box; margin: 0; padding: 0; }}
|
:root {{ --bg: #0d1117; --surface: #161b22; --border: #30363d; --dim: #21262d; --text: #e6edf3; --muted: #8b949e; }}
|
||||||
body {{ font-family: monospace; background: #0d1117; color: #c9d1d9; padding: 2rem; }}
|
*, *::before, *::after {{ box-sizing: border-box; margin: 0; padding: 0; }}
|
||||||
h1 {{ color: #58a6ff; margin-bottom: 0.25rem; }}
|
body {{ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; font-size: 15px; line-height: 1.6; }}
|
||||||
.desc {{ color: #8b949e; font-size: 0.9rem; margin: 0.4rem 0 0.25rem; }}
|
.site-nav {{ background: var(--surface); border-bottom: 1px solid var(--border); padding: 0.7rem 2rem; display: flex; align-items: center; gap: 0.6rem; position: sticky; top: 0; z-index: 10; }}
|
||||||
.meta {{ color: #8b949e; font-size: 0.85rem; margin-bottom: 2rem; }}
|
.nav-brand {{ color: #58a6ff; font-weight: 600; font-size: 0.9rem; text-decoration: none; }}
|
||||||
.meta a {{ color: #8b949e; }}
|
.nav-brand:hover {{ color: var(--text); }}
|
||||||
h2 {{ color: #8b949e; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 2rem 0 0.75rem; }}
|
.nav-sep {{ color: var(--border); }}
|
||||||
|
.nav-title {{ color: var(--text); font-weight: 500; font-size: 0.9rem; }}
|
||||||
|
.nav-right {{ margin-left: auto; }}
|
||||||
|
.nav-back {{ color: var(--muted); font-size: 0.85rem; text-decoration: none; }}
|
||||||
|
.nav-back:hover {{ color: var(--text); }}
|
||||||
|
.main {{ max-width: 1100px; margin: 0 auto; padding: 2.5rem 2rem 4rem; }}
|
||||||
|
h1 {{ font-size: 1.5rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }}
|
||||||
|
h2 {{ color: var(--muted); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin: 2rem 0 0.875rem; }}
|
||||||
|
.desc {{ color: var(--muted); font-size: 0.9rem; margin: 0.3rem 0 0.2rem; }}
|
||||||
|
.meta {{ color: var(--muted); font-size: 0.82rem; margin-top: 0.2rem; margin-bottom: 0; }}
|
||||||
|
.meta a {{ color: var(--muted); text-decoration: none; }}
|
||||||
|
.meta a:hover {{ color: var(--text); }}
|
||||||
table {{ width: 100%; border-collapse: collapse; }}
|
table {{ width: 100%; border-collapse: collapse; }}
|
||||||
td {{ padding: 0.6rem 1rem; border-bottom: 1px solid #21262d; font-size: 0.9rem; }}
|
td {{ padding: 0.6rem 1rem; border-bottom: 1px solid var(--dim); font-size: 0.875rem; }}
|
||||||
.query {{ color: #c9d1d9; }}
|
.query {{ color: var(--text); }}
|
||||||
.dim {{ color: #8b949e; }}
|
.dim {{ color: var(--muted); }}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<nav class="site-nav">
|
||||||
|
<a class="nav-brand" href="/">◈ NxM</a>
|
||||||
|
<span class="nav-sep">·</span>
|
||||||
|
<span class="nav-title">Sam — Research Agent</span>
|
||||||
|
<span class="nav-right"><a class="nav-back" href="/">← home</a></span>
|
||||||
|
</nav>
|
||||||
|
<main class="main">
|
||||||
<h1>Sam — Research Agent</h1>
|
<h1>Sam — Research Agent</h1>
|
||||||
<p class="desc">Web search via SearXNG + synthesis via Ollama. POST /research to use.</p>
|
<p class="desc">Web search via SearXNG + synthesis via Ollama. POST /research to use.</p>
|
||||||
<p class="meta">Updated <span data-utc="{now_iso}"></span> · <a href="/">← home</a></p>
|
<p class="meta">Updated <span data-utc="{now_iso}"></span></p>
|
||||||
<h2>Recent Queries</h2>
|
<h2>Recent Queries</h2>
|
||||||
<table><tbody>{empty}</tbody></table>
|
<table><tbody>{empty}</tbody></table>
|
||||||
<script>
|
<script>
|
||||||
@@ -159,6 +179,7 @@ def render_html(history: list[dict]) -> str:
|
|||||||
el.textContent = new Date(el.dataset.utc).toLocaleString(undefined, {{year:'numeric',month:'2-digit',day:'2-digit',hour:'2-digit',minute:'2-digit'}});
|
el.textContent = new Date(el.dataset.utc).toLocaleString(undefined, {{year:'numeric',month:'2-digit',day:'2-digit',hour:'2-digit',minute:'2-digit'}});
|
||||||
}});
|
}});
|
||||||
</script>
|
</script>
|
||||||
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>"""
|
</html>"""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user