From 82016eba0a02ffc3e6115d287651cdcec0b140b0 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 26 Mar 2025 13:55:38 -0700 Subject: [PATCH] docs vertex ft models --- docs/my-website/docs/providers/vertex.md | 34 +++++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/docs/my-website/docs/providers/vertex.md b/docs/my-website/docs/providers/vertex.md index b8633adc5e..ede3ae88d8 100644 --- a/docs/my-website/docs/providers/vertex.md +++ b/docs/my-website/docs/providers/vertex.md @@ -1385,7 +1385,7 @@ Call fine-tuned Vertex AI Gemini models through LiteLLM. If you want to use Lite | Supported Operations | `/chat/completions`, `/completions`, `/embeddings`, `/images` | - + ```python showLineNumbers import litellm @@ -1402,7 +1402,7 @@ response = litellm.completion( ``` - + 1. Add Vertex Credentials to your env @@ -1412,7 +1412,7 @@ response = litellm.completion( 2. Setup config.yaml -```yaml +```yaml showLineNumbers - model_name: finetuned-gemini litellm_params: model: vertex_ai/gemini/ @@ -1422,7 +1422,30 @@ response = litellm.completion( 3. Test it! -```bash + + + +```python showLineNumbers +from openai import OpenAI + +client = OpenAI( + api_key="your-litellm-key", + base_url="http://0.0.0.0:4000" +) + +response = client.chat.completions.create( + model="finetuned-gemini", + messages=[ + {"role": "user", "content": "hi"} + ] +) +print(response) +``` + + + + +```bash showLineNumbers curl --location 'https://0.0.0.0:4000/v1/chat/completions' \ --header 'Content-Type: application/json' \ --header 'Authorization: ' \ @@ -1432,6 +1455,9 @@ curl --location 'https://0.0.0.0:4000/v1/chat/completions' \ + + + ## Model Garden