Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

Refactor API request parameters in chat client

Salman-Ahameda7d84cf5588a
diff --git a/packages/app/src/react/features/ai-chat/clients/index.ts b/packages/app/src/react/features/ai-chat/clients/index.ts
index 280a74be..4ca55908 100644
--- a/packages/app/src/react/features/ai-chat/clients/index.ts
+++ b/packages/app/src/react/features/ai-chat/clients/index.ts
@@ -1,7 +1,7 @@
import { CreateChatRequest, FetchChatMessagesRequest } from '@react/shared/types/api-payload.types';
export const createChat = async (params: CreateChatRequest) => {
- const response = await fetch(`/api/page/chat/new`, {
+ const response = await fetch('/api/page/chat/new', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(params),
@@ -19,7 +19,7 @@ export const fetchChatMessages = async (params: FetchChatMessagesRequest) => {
export const updateAgentSettings = async (
agentId: string,
- settings: { key: string; value: any },
+ settings: { key: string; value: string },
) => {
const response = await fetch(`/api/page/agent_settings/ai-agent/${agentId}/settings`, {
method: 'PUT',