modificari mari
This commit is contained in:
@@ -247,5 +247,21 @@ export const inventoryApi = {
|
||||
updateAiPrompt: async (prompt: string) => {
|
||||
const res = await axiosInstance.post('/admin/db/settings/prompt', { value: prompt });
|
||||
return res.data;
|
||||
},
|
||||
getAiConfig: async () => {
|
||||
const res = await axiosInstance.get('/admin/db/settings/ai');
|
||||
return res.data;
|
||||
},
|
||||
updateAiProvider: async (provider: string) => {
|
||||
const res = await axiosInstance.post('/admin/db/settings/ai', { provider });
|
||||
return res.data;
|
||||
},
|
||||
updateAiKeys: async (keys: { gemini_api_key?: string, claude_api_key?: string }) => {
|
||||
const res = await axiosInstance.post('/admin/db/settings/ai-keys', keys);
|
||||
return res.data;
|
||||
},
|
||||
testAiKey: async (provider: string, key: string) => {
|
||||
const res = await axiosInstance.post('/admin/db/settings/test-ai-key', { provider, key });
|
||||
return res.data;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user