From 56e872d3c905dec21a3488fce19f9c9f156486d9 Mon Sep 17 00:00:00 2001 From: Mario Fahlandt Date: Sun, 25 Feb 2024 23:57:19 +0100 Subject: [PATCH 1/2] add documentation for google vertex ai backend Signed-off-by: Mario Fahlandt --- docs/reference/providers/backend.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/docs/reference/providers/backend.md b/docs/reference/providers/backend.md index caccf49..ae25ffc 100644 --- a/docs/reference/providers/backend.md +++ b/docs/reference/providers/backend.md @@ -2,7 +2,7 @@ A Backend (also called Provider) is a service that provides access to the AI language model. There are many different backends available for K8sGPT. Each backend has its own strengths and weaknesses, so it is important to choose the one that is right for your needs. -Currently, we have a total of 8 backends available: +Currently, we have a total of 9 backends available: - [OpenAI](https://openai.com/) - [Cohere](https://cohere.com/) @@ -10,6 +10,7 @@ Currently, we have a total of 8 backends available: - [Amazon SageMaker](https://aws.amazon.com/sagemaker/) - [Azure OpenAI](https://azure.microsoft.com/en-us/products/cognitive-services/openai-service) - [Google Gemini](https://ai.google.dev/docs/gemini_api_overview) +- [Google Vertex AI](https://cloud.google.com/vertex-ai) - [LocalAI](https://github.com/go-skynet/LocalAI) - FakeAI @@ -110,13 +111,36 @@ Google [Gemini](https://blog.google/technology/ai/google-gemini-ai/#performance) - To use Google Gemini API in K8sGPT, obtain [the API key](https://ai.google.dev/tutorials/setup). - To configure Google backend in K8sGPT with `gemini-pro` model (see all [models](https://ai.google.dev/models) here) use auth command: ```bash - k8sgpt auth add --backend google --model gemini-pro --password "" + k8sgpt auth add --backend googlevertexai --model gemini-pro --password "" ``` - Run the following command to analyze issues within your cluster with the Google provider: ```bash k8sgpt analyze --explain --backend google ``` +## Google Gemini via Vertex AI + +Google [Gemini](https://blog.google/technology/ai/google-gemini-ai/#performance) allows generative AI capabilities with multimodal approach (it is capable to understand not only text, but also code, audio, image and video). + +- To use [Google Vertex AI](https://cloud.google.com/vertex-ai?#build-with-gemini) you need to be authorized via [Google Cloud SDK](https://cloud.google.com/sdk/install). + The [Vertex AI API](https://console.cloud.google.com/apis/library/vertex-ai.googleapis.com) needs to be enabled. + +> Note: Vertex AI Gemini API is currently available in these [regions](https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/gemini?hl=de#http_request) + +- Open a terminal or command prompt and run the following command to authenticate using your Google Cloud credentials: + ```bash + gcloud auth application-default login + ``` + +- To configure Google backend in K8sGPT with `gemini-pro` model (see all [models](https://ai.google.dev/models) here) use auth command: + ```bash + k8sgpt auth add --backend googlevertexai --model "gemini-pro" --providerRegion "us-central1" --providerId "" + ``` +- Run the following command to analyze issues within your cluster with the Google provider: + ```bash + k8sgpt analyze --explain --backend googlevertexai + ``` + ## LocalAI LocalAI is a local model, which is an OpenAI compatible API. It uses llama.cpp and ggml to run inference on consumer-grade hardware. Models supported by LocalAI for instance are Vicuna, Alpaca, LLaMA, Cerebras, GPT4ALL, GPT4ALL-J and koala. From c4af680bfa3db3126ba27b8ec306057cad67625b Mon Sep 17 00:00:00 2001 From: Mario Fahlandt Date: Mon, 18 Mar 2024 13:46:07 +0100 Subject: [PATCH 2/2] feat: Gemini via Vertex API extended description Signed-off-by: Mario Fahlandt --- docs/reference/providers/backend.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/providers/backend.md b/docs/reference/providers/backend.md index ae25ffc..d63500b 100644 --- a/docs/reference/providers/backend.md +++ b/docs/reference/providers/backend.md @@ -2,7 +2,7 @@ A Backend (also called Provider) is a service that provides access to the AI language model. There are many different backends available for K8sGPT. Each backend has its own strengths and weaknesses, so it is important to choose the one that is right for your needs. -Currently, we have a total of 9 backends available: +Currently, we have a total of 10 backends available: - [OpenAI](https://openai.com/) - [Cohere](https://cohere.com/) @@ -125,7 +125,7 @@ Google [Gemini](https://blog.google/technology/ai/google-gemini-ai/#performance) - To use [Google Vertex AI](https://cloud.google.com/vertex-ai?#build-with-gemini) you need to be authorized via [Google Cloud SDK](https://cloud.google.com/sdk/install). The [Vertex AI API](https://console.cloud.google.com/apis/library/vertex-ai.googleapis.com) needs to be enabled. -> Note: Vertex AI Gemini API is currently available in these [regions](https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/gemini?hl=de#http_request) +> Note: Vertex AI Gemini API is currently available in these [regions](https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/gemini?hl=de#http_request), verify if those are working for your environment - Open a terminal or command prompt and run the following command to authenticate using your Google Cloud credentials: ```bash