//AI api 연결

import { Axios } from '../utils';


export const AnalyzeAI = async (token, params) => {
	try {
		const res = await Axios.post('/api/v1/ai/analyze', params, {
			headers: {
				Authorization: `Bearer ${token}`,
				'Content-Type': 'application/json'
			},
		});

		return res.data;
	} catch (e) {
		if (e instanceof Error) {
			throw new Error('analyzeAI Error', e);
		}
	}
};
