feat(frontend): update API clients and Kanban components with enhanced UI
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -50,6 +50,25 @@ export interface UploadResponse {
|
||||
indexed_at?: string | null
|
||||
}
|
||||
|
||||
export interface RAGSource {
|
||||
id: string
|
||||
title: string
|
||||
file_type: string
|
||||
similarity?: number
|
||||
chunk_content?: string
|
||||
}
|
||||
|
||||
export interface RAGChatRequest {
|
||||
query: string
|
||||
top_k?: number
|
||||
mode?: 'hybrid' | 'semantic' | 'keyword'
|
||||
}
|
||||
|
||||
export interface RAGChatResponse {
|
||||
answer: string
|
||||
sources: RAGSource[]
|
||||
}
|
||||
|
||||
export const documentApi = {
|
||||
list(folderId?: string | null) {
|
||||
return api.get<Document[]>('/api/documents', {
|
||||
@@ -93,4 +112,8 @@ export const documentApi = {
|
||||
getContent(id: string) {
|
||||
return api.get<string>(`/api/documents/${id}/content`)
|
||||
},
|
||||
|
||||
ragChat(payload: RAGChatRequest) {
|
||||
return api.post<RAGChatResponse>('/api/documents/rag', payload)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user