197 lines
8.0 KiB
HTML
197 lines
8.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>FastAPI — Nexus One AI Portal</title>
|
|
<link rel="stylesheet" href="style.css?v=4">
|
|
</head>
|
|
<body>
|
|
|
|
<header class="topnav">
|
|
<a href="index.html" class="brand">Nexus One <span>AI</span></a>
|
|
<nav>
|
|
<a href="index.html">Home</a>
|
|
<a href="quickstart.html">Quick Start</a>
|
|
<a href="prompts.html">Prompt Library</a>
|
|
<a href="usecases.html">Use Cases</a>
|
|
<span class="nav-sep"></span>
|
|
<div class="nav-dropdown">
|
|
<button class="nav-drop-btn">Help ▾</button>
|
|
<div class="nav-drop-menu">
|
|
<span class="nav-drop-cat">LEARN /</span>
|
|
<a href="quickstart.html">Quick Start</a>
|
|
<a href="models.html">Models</a>
|
|
<span class="nav-drop-cat">SUPPORT /</span>
|
|
<a href="troubleshooting.html">Troubleshoot</a>
|
|
<a href="faq.html">FAQ</a>
|
|
<span class="nav-drop-cat">MORE /</span>
|
|
<a href="glossary.html">Glossary</a>
|
|
<a href="whats-new.html">What's New</a>
|
|
</div>
|
|
</div>
|
|
<div class="nav-dropdown">
|
|
<button class="nav-drop-btn">Admin ▾</button>
|
|
<div class="nav-drop-menu nav-drop-menu-wide">
|
|
<span class="nav-drop-cat">DOCS /</span>
|
|
<a href="security.html">Security & Privacy</a>
|
|
<a href="admin.html">Admin Guide</a>
|
|
<span class="nav-drop-cat">MONITOR /</span>
|
|
<a href="dashboard.html">Dashboard</a>
|
|
<a href="analytics.html">Usage Analytics</a>
|
|
<a href="audit.html">Audit Log</a>
|
|
<a href="feedback.html">Feedback & Ratings</a>
|
|
<span class="nav-drop-cat">MANAGE /</span>
|
|
<a href="users.html">Users</a>
|
|
<a href="teams.html">Teams</a>
|
|
<a href="models-admin.html">Model Manager</a>
|
|
<a href="training.html">Training</a>
|
|
<a href="knowledge.html">Knowledge Base</a>
|
|
<span class="nav-drop-cat">TOOLS /</span>
|
|
<a href="apikeys.html">API Keys</a>
|
|
<a href="benchmark.html">Benchmarking</a>
|
|
<a href="model-compare.html">Model Compare</a>
|
|
<a href="api-playground.html">API Playground</a>
|
|
<a href="guardrails.html">Guardrails</a>
|
|
<a href="rag-quality.html">RAG Quality</a>
|
|
<a href="router.html">Model Router</a>
|
|
<a href="connectors.html">Connectors</a>
|
|
<span class="nav-drop-cat">SYSTEM /</span>
|
|
<a href="console.html">Console</a>
|
|
<a href="settings.html">Settings</a>
|
|
</div>
|
|
</div>
|
|
<div class="nav-dropdown">
|
|
<button class="nav-drop-btn">AI Tools ▾</button>
|
|
<div class="nav-drop-menu">
|
|
<span class="nav-drop-cat">INTELLIGENCE /</span>
|
|
<a href="documents.html">Document Intelligence</a>
|
|
<a href="chat-multi.html">Multimodal Chat</a>
|
|
<a href="prompt-studio.html">Prompt Studio</a>
|
|
<a href="meeting.html">Meeting Assistant</a>
|
|
<span class="nav-drop-cat">AUTOMATION /</span>
|
|
<a href="agents.html">Agent Builder</a>
|
|
<a href="schedules.html">Scheduled Jobs</a>
|
|
<a href="workflows.html">Workflow Automation</a>
|
|
<span class="nav-drop-cat">QUALITY /</span>
|
|
<a href="evals.html">AI Eval Suite</a>
|
|
<a href="chatrooms.html">Chat Rooms</a>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<a href="notifications.html" style="position:relative">🔔</a>
|
|
<span class="badge" data-brand="tier">Basic Tier</span>
|
|
<div id="nav-org-logo" class="nav-org-logo"></div>
|
|
</header>
|
|
|
|
<div class="tool-hero">
|
|
<div class="tool-icon">⚡</div>
|
|
<div class="tool-meta">
|
|
<a href="index.html#tools" class="back-link">← All Tools</a>
|
|
<h1>FastAPI</h1>
|
|
<div class="tagline">Build REST APIs that connect your existing applications to the AI models on this server.</div>
|
|
<div class="hero-actions">
|
|
<a href="http://ai.local:8080/docs" target="_blank" class="btn-primary">Open API Docs ↗</a>
|
|
<a href="http://ai.local:8080/redoc" target="_blank" class="btn-secondary">ReDoc View ↗</a>
|
|
<span class="access-pill">🔌 http://ai.local:8080</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<div class="section-title">What is it?</div>
|
|
<div class="info-grid">
|
|
<div class="info-card">
|
|
<h4>In plain terms</h4>
|
|
<p>FastAPI is a Python framework for building web APIs. In the context of Nexus One AI, it's used to create custom API endpoints that your existing applications (ERP, portals, internal tools) can call to get AI responses — without those applications knowing anything about Ollama or LangChain directly.</p>
|
|
</div>
|
|
<div class="info-card">
|
|
<h4>When you'd use it</h4>
|
|
<ul>
|
|
<li>You have an existing application that should be "AI-enabled"</li>
|
|
<li>You want a custom endpoint like <code>/api/summarise-complaint</code></li>
|
|
<li>You want to add authentication, rate limiting, or logging on top of AI calls</li>
|
|
<li>Your team builds in Java, .NET, or another language (they call FastAPI, not Python directly)</li>
|
|
<li>You want to expose a specific AI workflow as a simple API</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="notice">
|
|
💡 <strong>Already using Ollama?</strong> Ollama itself exposes a REST API at <code>http://localhost:11434/api/chat</code> that's compatible with the OpenAI API format. Many applications can connect to this directly — check if you need FastAPI at all before building a custom layer.
|
|
</div>
|
|
|
|
<div class="section-title">Ollama's built-in API (try this first)</div>
|
|
<div class="access-box">
|
|
<h4>Direct API — no FastAPI needed</h4>
|
|
<div class="access-row">
|
|
<span class="label">Base URL</span>
|
|
<span class="value">http://[server-ip]:11434</span>
|
|
</div>
|
|
<div class="access-row">
|
|
<span class="label">Chat</span>
|
|
<span class="value">POST /api/chat</span>
|
|
</div>
|
|
<div class="access-row">
|
|
<span class="label">Generate</span>
|
|
<span class="value">POST /api/generate</span>
|
|
</div>
|
|
<div class="access-row">
|
|
<span class="label">OpenAI compat</span>
|
|
<span class="value">POST /v1/chat/completions</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section-title">When to build a FastAPI layer</div>
|
|
<div class="steps">
|
|
<div class="step">
|
|
<div class="step-num">1</div>
|
|
<div>
|
|
<h4>Custom business logic</h4>
|
|
<p>If your AI workflow needs pre-processing (validate input, look up a record) or post-processing (format the output, log the result, trigger an action), FastAPI is where that logic lives.</p>
|
|
</div>
|
|
</div>
|
|
<div class="step">
|
|
<div class="step-num">2</div>
|
|
<div>
|
|
<h4>Document Q&A endpoint</h4>
|
|
<p>You want <code>POST /api/query-documents</code> that takes a question, queries ChromaDB, and returns an answer with source references. This combines LangChain + ChromaDB + Ollama behind one clean endpoint.</p>
|
|
</div>
|
|
</div>
|
|
<div class="step">
|
|
<div class="step-num">3</div>
|
|
<div>
|
|
<h4>Authentication and access control</h4>
|
|
<p>If you need API keys, user-based rate limits, or audit logs on AI usage, FastAPI is where you enforce those policies before passing the request to Ollama.</p>
|
|
</div>
|
|
</div>
|
|
<div class="step">
|
|
<div class="step-num">4</div>
|
|
<div>
|
|
<h4>Multi-step workflows</h4>
|
|
<p>If answering a request requires calling the AI multiple times (classify, then summarise, then extract), FastAPI orchestrates those steps and returns a single clean response.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section-title">Works with</div>
|
|
<div class="works-with">
|
|
<a href="tool-ollama.html">🦙 Ollama</a>
|
|
<a href="tool-langchain.html">🔗 LangChain</a>
|
|
<a href="tool-chromadb.html">🗂️ ChromaDB</a>
|
|
<a href="tool-jupyter.html">📓 Jupyter</a>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<footer>
|
|
<p>Nexus One AI · Powered by Cezen · Basic Tier</p>
|
|
<p>Questions? <a href="mailto:support@cezentech.com">support@cezentech.com</a></p>
|
|
</footer>
|
|
|
|
<script src="auth.js"></script>
|
|
<script src="branding.js"></script>
|
|
</body>
|
|
</html>
|