Skip to content

Latest commit

 

History

History
52 lines (44 loc) · 1.37 KB

example-04-emoji-translation.md

File metadata and controls

52 lines (44 loc) · 1.37 KB

Emoji Translation

Translate regular text into emoji text.

Example Usage

curl --location --request PUT 'https://api.openai.lawrencemcdaniel.com/examples/default-emoji-translation' \
--header 'x-api-key: YOUR-API-GATEWAY-KEY' \
--header 'Content-Type: application/json' \
--data '{"Artificial intelligence is a technology with great promise."}'

Example results

{
  "isBase64Encoded": false,
  "statusCode": 200,
  "headers": {
    "Content-Type": "application/json"
  },
  "body": {
    "id": "chatcmpl-7yTuWCwvgecRstWKGGv13q4bLvXyA",
    "object": "chat.completion",
    "created": 1694649012,
    "model": "gpt-3.5-turbo-0613",
    "choices": [
      {
        "index": 0,
        "message": {
          "role": "assistant",
          "content": "🤖🧠💡🌟👍"
        },
        "finish_reason": "stop"
      }
    ],
    "usage": {
      "prompt_tokens": 52,
      "completion_tokens": 14,
      "total_tokens": 66
    }
  }
}

Official Documentation

OpenAI Playground