News for hackers. Stuff that matters.
Re:Show HN: Symphony – Make functions invokable by GPT-4 by ilaksh on Tuesday September 19, 2023 @11:23PM (#37580072)
Nice. Just to point out, calling a sequence of functions is what GPT-4 does automatically if you keep feeding it the responses and it is clear to it that is necessary given it's instructions.

So the main point of this seems to be extracting the interface from the module and converting it into the OpenAI API call's functions format.

It's a good idea. But for me I would rather just have an npm package with a function like

  extractFunctions(srcFilename)
which I could then use inside of my own project which already handles the rest of it.
Re:Show HN: Symphony – Make functions invokable by GPT-4 by andrewguenther on Wednesday September 20, 2023 @12:11AM (#37580300)
Yep. I built this for Python recently and it uses introspection to automatically build this same info. It's maybe 100 lines in total? The OpenAI API is pretty amazing.
Re:Show HN: Symphony – Make functions invokable by GPT-4 by amrrs on Wednesday September 20, 2023 @12:46AM (#37580472)
Have you packaged or shared your codebase? If so would love to see it!
Re:Show HN: Symphony – Make functions invokable by GPT-4 by jrmyphlmn on Wednesday September 20, 2023 @03:31AM (#37581435)
That sounds great! I'm currently working on adding support for .py files as well – open to PRs :)
Re:Show HN: Symphony – Make functions invokable by GPT-4 by lukasb on Wednesday September 20, 2023 @01:47AM (#37580781)
Well, this knows when to stop calling GPT-4, which seems non-trivial.
Re:Show HN: Symphony – Make functions invokable by GPT-4 by wyozi on Wednesday September 20, 2023 @02:32AM (#37581051)
ChatGPT does this automatically, if you pass in `function_call: "auto"`
Re:Show HN: Symphony – Make functions invokable by GPT-4 by lukasb on Wednesday September 20, 2023 @05:50PM (#37590699)
How would this work? Say I need multiple function calls to handle a user prompt. OpenAI will only supply one function call at a time. My understanding is that "auto" just lets it choose which function to call, but you still have to know that you need to call it multiple times, and when to stop.
Re:Show HN: Symphony – Make functions invokable by GPT-4 by lgas on Friday September 22, 2023 @09:11AM (#37611575)
It can make multiple function calls. For example I have it hooked up to edit word documents, and I can say "create a word document, add a paragraph describing yourself and then add title 'xyz'" and it will make three separate function calls to do this before responding saying that it's completed the task.
Re:Show HN: Symphony – Make functions invokable by GPT-4 by jrmyphlmn on Wednesday September 20, 2023 @03:26AM (#37581397)
Thank you! You're right; the main focus right now is extraction.

One aspect I'm excited about is the possibility of rendering the JSON outputs from these function calls into components, as previewed here: https://symphony.run/showcase. Using a function's type definitions to design UI components seems like a nice starting point to embed interfaces into the conversation.

Additionally, I hope to make the toolkit language-agnostic. I'd like to incorporate some of my .py and .rs files to make them ready for use as well. Not sure if packaging it as an npm package would go against that objective, but will definitely consider :)