Skip to content
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

Feature Request: Support for VertexGemini Labels #2141

Open
gm2552 opened this issue Jan 28, 2025 · 1 comment
Open

Feature Request: Support for VertexGemini Labels #2141

gm2552 opened this issue Jan 28, 2025 · 1 comment
Assignees

Comments

@gm2552
Copy link

gm2552 commented Jan 28, 2025

Current Behavior

The Google Vertex-AI API supports a lables parameter to categorize and group requests. The VertexAiGeminiChatModel and corresponding options class currently do not support an approach to set labels on a request.

Expected Behavior

It would be desirable for the VertexAiGeminiChatModel and/or VertexAiGeminiChatOptions class to support the ability to set labels. Because labels are not part of the Google GenerationConfig structure (which is where options such as temperature and max tokens are set), it may or may not make sense for labels to be considered options; however, the ChatClient interface does not appear to have a better alternative for setting this type of request parameter. For that reason, perhaps a ChatOption is the best place for labels. Labels ares somewhat (if not exactly) analogous in purpose to OpenAI metadata (tagging requests) which are part of the OpenAIOptions, so this is another argument for labels to be part of VertexAiGeminiChatOptions.

Possible Example Enhancement:

var promptOptions = VertexAiGeminiChatOptions.builder().labels(Map.of("use", "training")).build();
chatClient.prompt().messages(userMessage).options(promptOptions).call().content();

Context

A current development partner uses Google Vertex-AI and takes advantage of the labels categorization for various business purposes. In order to move to SpringAI (technically wanting to move to Tanzu AI Solutions), it is desirable to be able to continue categorizing request with labels.

An practical alternative has not been identified (subclassing VertexAiGeminiChatOptions class will not work for this scenario).

@ilayaperumalg ilayaperumalg self-assigned this Jan 28, 2025
@gm2552
Copy link
Author

gm2552 commented Jan 30, 2025

I was going to propose/sumbit a PR for this feature request, but durning research today it turns out that the Vertex Java client does not expose labels (yet) as part of the API. I have yet to find a viable workaround in the Vertex API, so it is probable that this feature request will need to wait until the Vertex Java SDK is updated to accept labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants