fix: add providerId, maxTokens and topk to ai spec #545
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes # #535
📑 Description
We need to set maxTokens, providerId and topk for backends like google gemini and googlevertexai, else they fail with related errors.
This PR adds new environment variables for
K8SGPT_MAX_TOKENS
(default 2048) andK8SGPT_TOP_K
(default 50) into the k8sgpt deployment spec.It optionally adds the env var
K8SGPT_PROVIDER_ID
to the deployment specThe new K8SGPT CRD specs introduced for this are:
I have tested with vertex ai in GKE with a custom image of k8sgpt based off this PR k8sgpt-ai/k8sgpt#1280 with the example:
✅ Checks
ℹ Additional Information
This PR depends on k8sgpt-ai/k8sgpt#1280 for
K8SGPT_MAX_TOKENS
env var to configure k8sgpt server config.