Why this functions returns "[object Promise]" rather than text? async function…
- User
Why this functions returns "[object Promise]" rather than text?
async function get_profile_info() { try { const url=window.location.href; const dmn=url.substring(0,10)=="http://127"?"https://inkurdish.com/lfl/":""; const response = await fetch(
${dmn}api.php?user_profile=${uid}); if (!response.ok) throw new Error('Failed to fetch data');
const data = await response.json(); return "Success"; } catch (error) { console.error('Error fetching profile:', error); return null; } } Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.