Manish Kumar commited on
Commit ·
99f9013
1
Parent(s): 42a745c
new model fix new
Browse files
Dockerfile
CHANGED
|
@@ -25,4 +25,4 @@ ENV PORT=8000 HOST=0.0.0.0 PYTHONPATH=/app
|
|
| 25 |
|
| 26 |
EXPOSE 8000
|
| 27 |
|
| 28 |
-
CMD
|
|
|
|
| 25 |
|
| 26 |
EXPOSE 8000
|
| 27 |
|
| 28 |
+
CMD python -m uvicorn backend.app.main:app --host 0.0.0.0 --port ${PORT:-8000}
|
backend/app/llm/manager.py
CHANGED
|
@@ -63,8 +63,14 @@ class LLMManager:
|
|
| 63 |
return await p.generate_stream(*args, **kwargs)
|
| 64 |
|
| 65 |
async def get_status_info(self) -> Dict[str, Any]:
|
| 66 |
-
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
|
| 70 |
llm_manager = LLMManager()
|
|
|
|
| 63 |
return await p.generate_stream(*args, **kwargs)
|
| 64 |
|
| 65 |
async def get_status_info(self) -> Dict[str, Any]:
|
| 66 |
+
if self.provider:
|
| 67 |
+
return self.provider.get_info()
|
| 68 |
+
return {
|
| 69 |
+
"provider": "none",
|
| 70 |
+
"initialized": False,
|
| 71 |
+
"model_path": os.path.abspath(settings.LOCAL_MODEL_PATH),
|
| 72 |
+
"context_length": settings.DEFAULT_CONTEXT_LENGTH,
|
| 73 |
+
}
|
| 74 |
|
| 75 |
|
| 76 |
llm_manager = LLMManager()
|
backend/app/main.py
CHANGED
|
@@ -154,10 +154,10 @@ async def complete(request: CompletionRequest):
|
|
| 154 |
|
| 155 |
@api.get("/health")
|
| 156 |
async def health():
|
| 157 |
-
|
| 158 |
return {
|
| 159 |
"status": "ok",
|
| 160 |
-
"model_loaded":
|
| 161 |
}
|
| 162 |
|
| 163 |
|
|
|
|
| 154 |
|
| 155 |
@api.get("/health")
|
| 156 |
async def health():
|
| 157 |
+
initialized = llm_manager.provider is not None and llm_manager.provider.initialized
|
| 158 |
return {
|
| 159 |
"status": "ok",
|
| 160 |
+
"model_loaded": initialized,
|
| 161 |
}
|
| 162 |
|
| 163 |
|
frontend/src/components/AboutPage.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import React from 'react';
|
| 2 |
import { Info, Cpu, Code, BookOpen, HardDrive, Share2 } from 'lucide-react';
|
| 3 |
|
| 4 |
export const AboutPage: React.FC = () => {
|
|
|
|
| 1 |
+
import type React from 'react';
|
| 2 |
import { Info, Cpu, Code, BookOpen, HardDrive, Share2 } from 'lucide-react';
|
| 3 |
|
| 4 |
export const AboutPage: React.FC = () => {
|
frontend/src/components/Dashboard.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import React from 'react';
|
| 2 |
import {
|
| 3 |
MessageSquare, Code, FileText, ShieldAlert, List, RefreshCw,
|
| 4 |
Cpu, HardDrive, Database
|
|
|
|
| 1 |
+
import type React from 'react';
|
| 2 |
import {
|
| 3 |
MessageSquare, Code, FileText, ShieldAlert, List, RefreshCw,
|
| 4 |
Cpu, HardDrive, Database
|
frontend/src/components/Navbar.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import React from 'react';
|
| 2 |
import { motion } from 'framer-motion';
|
| 3 |
import {
|
| 4 |
Bell, Search, Sun, Moon, Cpu,
|
|
|
|
| 1 |
+
import type React from 'react';
|
| 2 |
import { motion } from 'framer-motion';
|
| 3 |
import {
|
| 4 |
Bell, Search, Sun, Moon, Cpu,
|
frontend/src/components/Sidebar.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import React from 'react';
|
| 2 |
import { motion, AnimatePresence } from 'framer-motion';
|
| 3 |
import {
|
| 4 |
MessageSquare, Code2, Settings2, ChevronLeft, ChevronRight, LayoutDashboard, Cpu,
|
|
|
|
| 1 |
+
import type React from 'react';
|
| 2 |
import { motion, AnimatePresence } from 'framer-motion';
|
| 3 |
import {
|
| 4 |
MessageSquare, Code2, Settings2, ChevronLeft, ChevronRight, LayoutDashboard, Cpu,
|