Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Run Scripts and call APIs inside ChatGPT
2 points by louison11 on May 3, 2023 | hide | past | favorite
Just a little trick I discovered: ChatGPT can't execute scripts or call APIs on its own yet. But it can display images.

You can call APIs and return the results via an image using a 3rd party server or a simple Cloudflare Workers.

Example with this prompt that calls a domain availability API through an image tag:

Suggest 20 domain names for a product that helps people find the best books easily. Deliver the results in a table, with the domain in the first column, and its availability in the next column. In the availability column, place an image with the following source URL format: https://domains.geniecf.workers.dev/?domain=domain-name.com



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: