Tell HN: OpenAI still has a moat, it's called function calling and its API
Another thing people often neglect is that OpenAI basically owns the API design right now. The fact that there are several drop-in replacements for their API shows how much apps depend on the specific structure of their API. For comparison, this is Gemini's REST API usage:
``` echo '{ "contents":[ { "parts":[ {"text": "What is this picture?"}, { "inline_data": { "mime_type":"image/jpeg", "data": "'$(base64 -w0 image.jpg)'" } } ] } ] }' > request.json
curl https://generativelanguage.googleapis.com/v1beta/models/gemini-pro-vision:generateContent?key=${API_KEY} \
-H 'Content-Type: application/json' \
-d @request.json 2> /dev/null | grep "text"
```And here's another one:
``` curl https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=$API_KEY \ -H 'Content-Type: application/json' \ -X POST \ -d '{ "contents": [{ "parts":[ {"text": "Write a story about a magic backpack."} ] }], "safetySettings": [ { "category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_ONLY_HIGH" } ], "generationConfig": { "stopSequences": [ "Title" ], "temperature": 1.0, "maxOutputTokens": 800, "topP": 0.8, "topK": 10 } }' 2> /dev/null | grep "text" ```