-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interact with Vertex Tuned Models #36
Comments
Hello @LuizOVianna Right now, I have to look in to the URI endpoint patterns. This needs to be more flexible for Vertex AI in particular. Thanks for pointing this out. Cheers, JoKi |
Looking quickly at the sources, it shows that the URL of Vertex AI is templated and shall be ready for other endpoints. generative-ai/src/Mscc.GenerativeAI/GenerativeModel.cs Lines 27 to 31 in 4b0e7fe
However, there's currently no publicly exposed method to specify the As said, going to look into that. @LuizOVianna , I would appreciate that you could provide an example or two for Vertex AI endpoints, if you don't mind. Of course, masking sensitive information. Thanks JoKi |
Hi, I could make it work using HttpClient. The Endpoint indicated by Google is a little diferent, in this following format:
It needs the projectId, location/region, indpointId(not name) See here original Google instruction: Hope all these helps! ;) |
Hello @LuizOVianna That's absolutely great, thanks! Please bear with me, changes are on the way. Cheers, JoKi |
Nice, Let me know when you got there... Regards from Brazil ;) |
Quick info that I started working on this. Regards, JoKi |
Hello @LuizOVianna Kindly check whether Release v1.9.0 resolves this issue. There had been quite a bit of refactoring to incorporate tuning jobs and Vertex AI endpoints of tuned models. Hope this helps, JoKi |
Great!! I´ll try as soon I get into this, and let You know... Is there any documentation of it? |
Hello @LuizOVianna, Ah, yes, documentation. Gotta have to write that (still), thanks for the reminder. ;-) For now, using the using Mscc.GenerativeAI;
var vertex = new VertexAI(projectId: projectId, region: region);
vertex.EndpointId = "<specify TunedModel.Endpoint>" // eg. endpoints/1234
var model = vertex.GenerativeModel(model: "<specify TunedModel.Name>");
var response = await model.GenerateContent(prompt);
Console.WriteLine(response.Text); There is also a new overload to pass in a TuningJob as a parameter. using Mscc.GenerativeAI;
var vertex = new VertexAI(projectId: projectId, region: region);
var sft = vertex.SupervisedTuningJob();
var tuningJob = await sft.List().FirstOrDefault(); // or use sft.Get("<specify name of tuning job>");
var model = vertex.GenerativeModel(tuningJob);
var response = await model.GenerateContent(prompt);
Console.WriteLine(response.Text); Which means that the package now also provides functionality to create, list, get and cancel supervised fine-tuning in Vertex AI. Hope this helps, JoKi |
I did not find a way to interact with tuned models prediction endpoints. Is there a way?
The text was updated successfully, but these errors were encountered: