Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Playground for OpenAI API with function calls (amazonaws.com)
12 points by acover on July 17, 2023 | hide | past | favorite | 6 comments
I was frustrated that open ai's playground lacks function calls, so I wrote my own more similar to ChatGpt!

Now I can:

* use the same models I program against

* have access to function calls

* can see how much it's costing me

Side benefit: I can share my API key with a friend so they can use Gpt3.5 & 4 as open ai took their deposit but still labelled their account as free tier - mistakes happen.

Prerequisite: an open ai api key

https://github.com/acover288/playgpt

Use at your own risk as I blindly installed npm packages.




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.


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"]
      }
    }
  ]


Do you store people's queries and/or the responses?


It's all hosted with AWS S3, I have no server.

In the future, I want to store the chat history in local storage with some search features.


Great first version of the project.


Thanks, I'm trying to get over the desire to perfect things before releasing them.




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

Search: