4 ms·
Show HN: Playground for OpenAI API with function calls
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 https://github.com/acover288/playgpt
Use at your own risk as I blindly installed npm packages.
- andsoitis 3y agoDo you store people's queries and/or the responses?
- acover 3y agoIt'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.
- vikasr111 3y agoGreat first version of the project.
- acover 3y agoThanks, I'm trying to get over the desire to perfect things before releasing them.
- jasonwcfan 3y agoLooks 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.
- acover 3y agoI 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"] } } ]