fix(ui): Re-add Chat
This commit is contained in:
4
webui/react-ui/src/utils/api.js
vendored
4
webui/react-ui/src/utils/api.js
vendored
@@ -177,9 +177,9 @@ export const agentApi = {
|
||||
|
||||
// Chat-related API calls
|
||||
export const chatApi = {
|
||||
// Send a chat message to an agent
|
||||
// Send a message to an agent using the JSON-based API
|
||||
sendMessage: async (name, message) => {
|
||||
const response = await fetch(buildUrl(API_CONFIG.endpoints.chat(name)), {
|
||||
const response = await fetch(buildUrl(API_CONFIG.endpoints.chatApi(name)), {
|
||||
method: 'POST',
|
||||
headers: API_CONFIG.headers,
|
||||
body: JSON.stringify({ message }),
|
||||
|
||||
1
webui/react-ui/src/utils/config.js
vendored
1
webui/react-ui/src/utils/config.js
vendored
@@ -34,6 +34,7 @@ export const API_CONFIG = {
|
||||
|
||||
// Chat endpoints
|
||||
chat: (name) => `/chat/${name}`,
|
||||
chatApi: (name) => `/api/chat/${name}`,
|
||||
notify: (name) => `/notify/${name}`,
|
||||
responses: '/v1/responses',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user