Add AI chat with Ollama tool calling for financial queries
Conversational AI chat that uses Ollama's native tool-calling API to query transactions, spending reports, account balances, dashboard summaries, and update transaction categories through natural language. Includes persistent conversation history, a full-page chat UI with sidebar, and rich inline rendering of tool results (tables, alerts, cards). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import api from './api'
|
||||
import type { ChatConversation, ChatConversationDetail, SendChatMessageResponse } from '@/types'
|
||||
|
||||
export const chatApi = {
|
||||
sendMessage: (data: { conversationId?: string; message: string }) =>
|
||||
api.post<SendChatMessageResponse>('/chat/send', data),
|
||||
|
||||
getConversations: () =>
|
||||
api.get<ChatConversation[]>('/chat/conversations'),
|
||||
|
||||
getConversation: (id: string) =>
|
||||
api.get<ChatConversationDetail>(`/chat/conversations/${id}`),
|
||||
|
||||
deleteConversation: (id: string) =>
|
||||
api.delete(`/chat/conversations/${id}`),
|
||||
}
|
||||
Reference in New Issue
Block a user