sashabaranov/go-openai ? reverse-engineered prompt

Reverse engineered prompt

Build me a Go client for the OpenAI API that I can drop into a project and use right away.

I want it to make it easy to send prompts, get normal text back, stream partial replies as they come in, and keep track of multi turn conversations. It should also cover the other common OpenAI features like embeddings, images, audio, moderation, files, fine tuning, batches, vector stores, and the older assistants style workflow too.

Please make it simple to configure with an API key, custom base URL, organization, and extra headers, and let me swap in my own HTTP client if needed. Include a few runnable examples so I can see how to use it for chat, streaming, image generation, and speech to text. Keep the package clean, lightweight, and easy to understand, and if you need to check the latest API details, look them up online first.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab