File tree Expand file tree Collapse file tree 3 files changed +14
-18
lines changed Expand file tree Collapse file tree 3 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -55,12 +55,14 @@ export default function AuthPage() {
5555 return (
5656 < div className = "flex min-h-screen items-center justify-center bg-background p-6" >
5757 < div className = "absolute top-6 left-6" >
58- < Button variant = "ghost" size = "sm" asChild className = "paper-effect" >
59- < Link href = "/" className = "flex items-center gap-1" >
60- < ArrowLeft className = "h-4 w-4" />
61- < span > Back</ span >
62- </ Link >
63- </ Button >
58+ < Link href = "/" className = "flex items-center gap-1" >
59+ < Button variant = "ghost" size = "sm" className = "paper-effect" >
60+ < >
61+ < ArrowLeft className = "h-4 w-4" />
62+ < span > Back</ span >
63+ </ >
64+ </ Button >
65+ </ Link >
6466 </ div >
6567
6668 < Card className = "w-full max-w-md paper-effect" >
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ router.post("/assistant", async (c) => {
132132 if ( q [ 0 ] . ok !== 1 ) {
133133 return c . json (
134134 { error : "Sorry, We don't have MindsDB up at the moment." } ,
135- 403
135+ 503
136136 ) ;
137137 }
138138 } catch ( error ) {
Original file line number Diff line number Diff line change 11import { MindsDBConfig } from "@kbnet/shared" ;
22import { sanitizeSQLValue } from "./util" ;
33import { mindsDBUrl } from ".." ;
4-
54export async function runMindsDBQuery ( query : string ) {
65 try {
76 const res = await fetch ( `${ mindsDBUrl } /api/sql/query` , {
@@ -13,7 +12,7 @@ export async function runMindsDBQuery(query: string) {
1312 } ) ;
1413
1514 if ( ! res . ok ) {
16- throw new Error ( `HTTP error! status: ${ res . status } ` ) ;
15+ throw new Error ( `HTTP error! status: ${ res . status || "unknown" } ` ) ;
1716 }
1817 const rawData : any = await res . json ( ) ;
1918
@@ -39,11 +38,9 @@ export async function runMindsDBQuery(query: string) {
3938
4039export async function getKBContext ( query : string , enabled = true ) {
4140 if ( ! enabled ) {
42- return {
43- rows : [
44- { chunk_content : `Use your own knowledge base to answer: ${ query } ` } ,
45- ] ,
46- } ;
41+ return [
42+ { chunk_content : `Use your own knowledge base to answer: ${ query } ` } ,
43+ ] ;
4744 }
4845
4946 let kbdata ;
@@ -59,10 +56,7 @@ export async function getKBContext(query: string, enabled = true) {
5956 error . message
6057 ) ;
6158
62- console . log ( kbdata ) ;
63- kbdata = {
64- rows : [ ] ,
65- } ;
59+ kbdata = [ ] ;
6660 }
6761
6862 return kbdata ;
You can’t perform that action at this time.
0 commit comments