Skip to content

Commit

Permalink
docs(gemini.md,-deploy.md): doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
krrishdholakia committed Jan 8, 2024
1 parent 4ea3e77 commit c720870
Show file tree
Hide file tree
Showing 5 changed files with 1,003 additions and 523 deletions.
28 changes: 28 additions & 0 deletions docs/my-website/docs/providers/gemini.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Gemini - Google AI Studio

## Pre-requisites
* `pip install -q google-generativeai`

## Sample Usage
```python
import litellm
import os

os.environ['GEMINI_API_KEY'] = ""
response = completion(
model="gemini/gemini-pro",
messages=[{"role": "user", "content": "write code for saying hi from LiteLLM"}]
)
```

LiteLLM Supports the following image types passed in `url`
- Images with direct links - https://storage.googleapis.com/github-repo/img/gemini/intro/landmark3.jpg
- Image in local storage - ./localimage.jpeg



## Chat Models
| Model Name | Function Call | Required OS Variables |
|------------------|--------------------------------------|-------------------------|
| gemini-pro | `completion('gemini/gemini-pro', messages)` | `os.environ['PALM_API_KEY']` |
| gemini-pro-vision | `completion('gemini/gemini-pro-vision', messages)` | `os.environ['PALM_API_KEY']` |
26 changes: 26 additions & 0 deletions docs/my-website/docs/proxy/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,32 @@ Run the command `docker-compose up` or `docker compose up` as per your docker in
Your LiteLLM container should be running now on the defined port e.g. `8000`.


## Deploy with Database

#### Step 1. Save the database url in your environment
.env example: https://github.com/BerriAI/litellm/blob/main/docker/.env.example


```env
DATABASE_URL = "my-postgres-db-url"
```

#### Step 2. Build docker image with build-args

Set `with_database=true` in the docker build, to trigger the prisma logic to be run

Example build command:
```bash
docker build -t my-docker-build --build-arg with_database=true .
```

#### Step 3. Run docker image

```bash
docker run -it -p 8000:4000 my-docker-build
```


## Deploy on Render https://render.com/

<iframe width="840" height="500" src="https://www.loom.com/embed/805964b3c8384b41be180a61442389a3" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
Expand Down
1 change: 1 addition & 0 deletions docs/my-website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const sidebars = {
"providers/ollama",
"providers/vertex",
"providers/palm",
"providers/gemini",
"providers/mistral",
"providers/anthropic",
"providers/aws_sagemaker",
Expand Down
Loading

0 comments on commit c720870

Please sign in to comment.