News for hackers. Stuff that matters.
Re:Show HN: Playground for OpenAI API with function calls by jasonwcfan on Tuesday July 18, 2023 @01:05AM (#36768020)
Looks cool! One piece of feedback: It's really tedious to have to type in JSON. Making it a form would save tons of time having to write it out manually.
Re:Show HN: Playground for OpenAI API with function calls by acover on Sunday July 23, 2023 @02:06PM (#36837957)
I prefer text. If the JSON had very specific keys that needed values then a form would be very useful. However, the function_call api takes essentially arbitrary json, which would be very difficult to edit with a form interface. You'd need buttons for adding nested items, editing keys, editing values. It would be a mess.

Imagine creating the following simple function call:

  [
    {
      "name": "get_current_weather",
      "description": "Get the current weather in a given location",
      "parameters": {
        "type": "object",
        "properties": {
          "location": {
            "type": "string",
            "description": "The city and state, e.g. San Francisco, CA"
          },
          "unit": {
            "type": "string",
            "enum": ["celsius", "fahrenheit"]
          }
        },
        "required": ["location"]
      }
    }
  ]