MCPcopy Create free account
hub / github.com/admineral/OpenAI-Assistant-API-Chat / addMessage

Function addMessage

app/services/api.js:128–142  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

126
127 // Adds a message
128 export const addMessage = async (data) => {
129 console.log('File IDs in addMessage:', data.fileIds);
130 console.log('Adding message...');
131 const response = await fetch('/api/addMessage', {
132 method: 'POST',
133 headers: { 'Content-Type': 'application/json' },
134 body: JSON.stringify(data),
135 });
136 if (!response.ok) {
137 console.error('Failed to add message');
138 throw new Error('Failed to add message');
139 }
140 console.log('Message added successfully');
141 return await response.json();
142 };
143
144 // Deletes a file
145 export const deleteFile = async (fileId) => {

Callers 1

submitUserMessageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected