uber/go-vertex-ai — reverse-engineered prompt
Reverse engineered prompt
Build me a small Go library that makes it easy for another Go app to talk to Google Vertex AI language models.
I want a simple client that I can create with my Google Cloud key, then use for three things, regular text generation, multi turn chat, and text embeddings. It should handle the auth token work and request building for me, and return clean Go structs with the model responses. Please keep the API straightforward and readable, so a developer can do something like create a client, pass a context plus project and model info, and get a result without a lot of setup.
Include runnable examples for each feature so I can quickly test text prompts, chat conversations, and embedding requests with my own project. Add reasonable tests around the client, config, token handling, request building, and the main request methods. If you need to, look up the current Vertex AI docs online and make the implementation match the real API as closely as possible.
Want more depth? Deep Reverse