Revert "feat: make --model optional (#668)" (#672)

This reverts commit c55e4481ba.
release-notes-05
Meng Zhang 2023-10-29 21:44:11 -07:00 committed by GitHub
parent f991b8b7ab
commit de827b1e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 32 additions and 54 deletions

View File

@ -10,7 +10,6 @@
* Switch cpu backend to llama.cpp: https://github.com/TabbyML/tabby/pull/638 * Switch cpu backend to llama.cpp: https://github.com/TabbyML/tabby/pull/638
* add `server.completion_timeout` to control the code completion interface timeout: https://github.com/TabbyML/tabby/pull/637 * add `server.completion_timeout` to control the code completion interface timeout: https://github.com/TabbyML/tabby/pull/637
* Switch cuda backend to llama.cpp: https://github.com/TabbyML/tabby/pull/656 * Switch cuda backend to llama.cpp: https://github.com/TabbyML/tabby/pull/656
* Make `--model` optional, so users can create a chat only instance.
# v0.4.0 # v0.4.0

View File

@ -9,7 +9,7 @@ use utoipa::ToSchema;
#[derive(Serialize, Deserialize, ToSchema, Clone, Debug)] #[derive(Serialize, Deserialize, ToSchema, Clone, Debug)]
pub struct HealthState { pub struct HealthState {
model: Option<String>, model: String,
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
chat_model: Option<String>, chat_model: Option<String>,
device: String, device: String,

View File

@ -106,7 +106,7 @@ impl Device {
pub struct ServeArgs { pub struct ServeArgs {
/// Model id for `/completions` API endpoint. /// Model id for `/completions` API endpoint.
#[clap(long)] #[clap(long)]
model: Option<String>, model: String,
/// Model id for `/chat/completions` API endpoints. /// Model id for `/chat/completions` API endpoints.
#[clap(long)] #[clap(long)]
@ -129,9 +129,7 @@ pub async fn main(config: &Config, args: &ServeArgs) {
valid_args(args); valid_args(args);
if args.device != Device::ExperimentalHttp { if args.device != Device::ExperimentalHttp {
if let Some(model) = &args.model { download_model(&args.model).await;
download_model(model).await;
}
if let Some(chat_model) = &args.chat_model { if let Some(chat_model) = &args.chat_model {
download_model(chat_model).await; download_model(chat_model).await;
} }
@ -173,22 +171,20 @@ pub async fn main(config: &Config, args: &ServeArgs) {
fn api_router(args: &ServeArgs, config: &Config) -> Router { fn api_router(args: &ServeArgs, config: &Config) -> Router {
let index_server = Arc::new(IndexServer::new()); let index_server = Arc::new(IndexServer::new());
let completion_state = if let Some(model) = &args.model { let completion_state = {
let ( let (
engine, engine,
EngineInfo { EngineInfo {
prompt_template, .. prompt_template, ..
}, },
) = create_engine(model, args); ) = create_engine(&args.model, args);
let engine = Arc::new(engine); let engine = Arc::new(engine);
let state = completions::CompletionState::new( let state = completions::CompletionState::new(
engine.clone(), engine.clone(),
index_server.clone(), index_server.clone(),
prompt_template, prompt_template,
); );
Some(Arc::new(state)) Arc::new(state)
} else {
None
}; };
let chat_state = if let Some(chat_model) = &args.chat_model { let chat_state = if let Some(chat_model) = &args.chat_model {
@ -219,18 +215,16 @@ fn api_router(args: &ServeArgs, config: &Config) -> Router {
) )
}); });
if let Some(completion_state) = completion_state { routers.push({
routers.push({ Router::new()
Router::new() .route(
.route( "/v1/completions",
"/v1/completions", routing::post(completions::completions).with_state(completion_state),
routing::post(completions::completions).with_state(completion_state), )
) .layer(TimeoutLayer::new(Duration::from_secs(
.layer(TimeoutLayer::new(Duration::from_secs( config.server.completion_timeout,
config.server.completion_timeout, )))
))) });
});
}
if let Some(chat_state) = chat_state { if let Some(chat_state) = chat_state {
routers.push({ routers.push({
@ -285,19 +279,6 @@ trait OpenApiOverride {
impl OpenApiOverride for utoipa::openapi::OpenApi { impl OpenApiOverride for utoipa::openapi::OpenApi {
fn override_doc(&mut self, args: &ServeArgs) { fn override_doc(&mut self, args: &ServeArgs) {
if args.model.is_none() {
self.paths.paths.remove("/v1/completions");
if let Some(components) = self.components.as_mut() {
components.schemas.remove("CompletionRequest");
components.schemas.remove("CompletionResponse");
components.schemas.remove("Choice");
components.schemas.remove("DebugData");
components.schemas.remove("DebugOptions");
components.schemas.remove("Segments");
components.schemas.remove("Snippet");
}
}
if args.chat_model.is_none() { if args.chat_model.is_none() {
self.paths.paths.remove("/v1beta/chat/completions"); self.paths.paths.remove("/v1beta/chat/completions");

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
1:HL["/_next/static/media/86fdec36ddd9097e-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 1:HL["/_next/static/media/86fdec36ddd9097e-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
2:HL["/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 2:HL["/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
3:HL["/_next/static/css/2b051a9b83c80bf9.css","style"] 3:HL["/_next/static/css/2b051a9b83c80bf9.css","style"]
0:["OqK3ih1CowLA0x8lARuCQ",[[["",{"children":["api",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]] 0:["QrHYrv6IM9fXxh7mpanWB",[[["",{"children":["api",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]]
6:I{"id":5925,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Toaster","async":false} 6:I{"id":5925,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Toaster","async":false}
7:I{"id":78495,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Providers","async":false} 7:I{"id":78495,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Providers","async":false}
8:I{"id":79446,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Header","async":false} 8:I{"id":79446,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Header","async":false}

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,14 @@
1:HL["/_next/static/media/86fdec36ddd9097e-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 1:HL["/_next/static/media/86fdec36ddd9097e-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
2:HL["/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 2:HL["/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
3:HL["/_next/static/css/2b051a9b83c80bf9.css","style"] 3:HL["/_next/static/css/2b051a9b83c80bf9.css","style"]
0:["OqK3ih1CowLA0x8lARuCQ",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]] 0:["QrHYrv6IM9fXxh7mpanWB",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]]
6:I{"id":5925,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Toaster","async":false} 6:I{"id":5925,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Toaster","async":false}
7:I{"id":78495,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Providers","async":false} 7:I{"id":78495,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Providers","async":false}
8:I{"id":79446,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Header","async":false} 8:I{"id":79446,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Header","async":false}
9:I{"id":81443,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false} 9:I{"id":81443,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false}
a:I{"id":18639,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false} a:I{"id":18639,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false}
c:I{"id":65146,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false} c:I{"id":65146,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false}
d:I{"id":25454,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","362:static/chunks/362-ae0994d279f3f3bb.js","703:static/chunks/703-35aa8c1eaf8df6ef.js","894:static/chunks/894-f0d1adefd8c6331e.js","931:static/chunks/app/page-11121665fe0055a9.js"],"name":"","async":false} d:I{"id":25454,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","362:static/chunks/362-ae0994d279f3f3bb.js","703:static/chunks/703-35aa8c1eaf8df6ef.js","894:static/chunks/894-f0d1adefd8c6331e.js","931:static/chunks/app/page-478c8032840b58db.js"],"name":"","async":false}
4:[null,["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{}],["$","body",null,{"className":"font-sans antialiased __variable_e66fe9 __variable_bd9c35","children":[["$","$L6",null,{}],["$","$L7",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"children":[["$","div",null,{"className":"flex min-h-screen flex-col","children":[["$","$L8",null,{}],["$","main",null,{"className":"flex flex-1 flex-col bg-muted/50","children":["$","$L9",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$La",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$Lb",["$","$Lc",null,{"propsForComponent":{"params":{}},"Component":"$d"}],null],"segment":"__PAGE__"},"styles":[]}]}]]}],null]}]]}]]}],null] 4:[null,["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{}],["$","body",null,{"className":"font-sans antialiased __variable_e66fe9 __variable_bd9c35","children":[["$","$L6",null,{}],["$","$L7",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"children":[["$","div",null,{"className":"flex min-h-screen flex-col","children":[["$","$L8",null,{}],["$","main",null,{"className":"flex flex-1 flex-col bg-muted/50","children":["$","$L9",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$La",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$Lb",["$","$Lc",null,{"propsForComponent":{"params":{}},"Component":"$d"}],null],"segment":"__PAGE__"},"styles":[]}]}]]}],null]}]]}]]}],null]
5:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Tabby - Home"}],["$","meta","2",{"name":"description","content":"Tabby, an opensource, self-hosted AI coding assistant."}],["$","meta","3",{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"white"}],["$","meta","4",{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"black"}],["$","meta","5",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","6",{"name":"next-size-adjust"}]] 5:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Tabby - Home"}],["$","meta","2",{"name":"description","content":"Tabby, an opensource, self-hosted AI coding assistant."}],["$","meta","3",{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"white"}],["$","meta","4",{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"black"}],["$","meta","5",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","6",{"name":"next-size-adjust"}]]
b:null b:null

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
1:HL["/_next/static/media/86fdec36ddd9097e-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 1:HL["/_next/static/media/86fdec36ddd9097e-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
2:HL["/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 2:HL["/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
3:HL["/_next/static/css/2b051a9b83c80bf9.css","style"] 3:HL["/_next/static/css/2b051a9b83c80bf9.css","style"]
0:["OqK3ih1CowLA0x8lARuCQ",[[["",{"children":["playground",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]] 0:["QrHYrv6IM9fXxh7mpanWB",[[["",{"children":["playground",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]]
6:I{"id":5925,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Toaster","async":false} 6:I{"id":5925,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Toaster","async":false}
7:I{"id":78495,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Providers","async":false} 7:I{"id":78495,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Providers","async":false}
8:I{"id":79446,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Header","async":false} 8:I{"id":79446,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Header","async":false}
@ -9,5 +9,5 @@
a:I{"id":18639,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false} a:I{"id":18639,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false}
c:I{"id":12202,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","28:static/chunks/28-27d0fe8a88c4cbfb.js","894:static/chunks/894-f0d1adefd8c6331e.js","383:static/chunks/app/playground/page-b742820613e86585.js"],"name":"Chat","async":false} c:I{"id":12202,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","28:static/chunks/28-27d0fe8a88c4cbfb.js","894:static/chunks/894-f0d1adefd8c6331e.js","383:static/chunks/app/playground/page-b742820613e86585.js"],"name":"Chat","async":false}
5:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Tabby - Playground"}],["$","meta","2",{"name":"description","content":"Tabby, an opensource, self-hosted AI coding assistant."}],["$","meta","3",{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"white"}],["$","meta","4",{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"black"}],["$","meta","5",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","6",{"name":"next-size-adjust"}]] 5:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Tabby - Playground"}],["$","meta","2",{"name":"description","content":"Tabby, an opensource, self-hosted AI coding assistant."}],["$","meta","3",{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"white"}],["$","meta","4",{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"black"}],["$","meta","5",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","6",{"name":"next-size-adjust"}]]
4:[null,["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{}],["$","body",null,{"className":"font-sans antialiased __variable_e66fe9 __variable_bd9c35","children":[["$","$L6",null,{}],["$","$L7",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"children":[["$","div",null,{"className":"flex min-h-screen flex-col","children":[["$","$L8",null,{}],["$","main",null,{"className":"flex flex-1 flex-col bg-muted/50","children":["$","$L9",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$La",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$","$L9",null,{"parallelRouterKey":"children","segmentPath":["children","playground","children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$La",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$Lb",["$","$Lc",null,{"id":"j07pYnp"}],null],"segment":"__PAGE__"},"styles":[]}],"segment":"playground"},"styles":[]}]}]]}],null]}]]}]]}],null] 4:[null,["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{}],["$","body",null,{"className":"font-sans antialiased __variable_e66fe9 __variable_bd9c35","children":[["$","$L6",null,{}],["$","$L7",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"children":[["$","div",null,{"className":"flex min-h-screen flex-col","children":[["$","$L8",null,{}],["$","main",null,{"className":"flex flex-1 flex-col bg-muted/50","children":["$","$L9",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$La",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$","$L9",null,{"parallelRouterKey":"children","segmentPath":["children","playground","children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$La",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$Lb",["$","$Lc",null,{"id":"GG5oy2I"}],null],"segment":"__PAGE__"},"styles":[]}],"segment":"playground"},"styles":[]}]}]]}],null]}]]}]]}],null]
b:null b:null

View File

@ -95,13 +95,11 @@ function MainPanel() {
<img <img
src={`https://img.shields.io/badge/device-${healthInfo.device}-blue`} src={`https://img.shields.io/badge/device-${healthInfo.device}-blue`}
/> />
{healthInfo.model && ( <img
<img src={`https://img.shields.io/badge/model-${toBadgeString(
src={`https://img.shields.io/badge/model-${toBadgeString( healthInfo.model
healthInfo.model )}-red`}
)}-red`} />
/>
)}
{healthInfo.chat_model && ( {healthInfo.chat_model && (
<img <img
src={`https://img.shields.io/badge/chat%20model-${toBadgeString( src={`https://img.shields.io/badge/chat%20model-${toBadgeString(

View File

@ -6,7 +6,7 @@ import fetcher from '@/lib/tabby-fetcher'
export interface HealthInfo { export interface HealthInfo {
device: string device: string
model?: string model: string
chat_model?: string chat_model?: string
version: { version: {
build_date: string build_date: string