From 479931bd6d3a98de88eb1b2d0487fcc50c312575 Mon Sep 17 00:00:00 2001
From: Zakhar Kogan <36503576+zaharkogan@users.noreply.github.com>
Date: Fri, 11 Aug 2023 13:36:33 +0300
Subject: [PATCH 1/2] Updated the docs with Openrouter
---
docs/input.md | 2 +-
docs/supported.md | 15 ++++++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/docs/input.md b/docs/input.md
index a9b8f3f2ce..5d3ba77a57 100644
--- a/docs/input.md
+++ b/docs/input.md
@@ -1,6 +1,6 @@
# Completion Function - completion()
The Input params are **exactly the same** as the
-OpenAI Create chat completion, and let you call **Azure OpenAI, Anthropic, Cohere, Replicate** models in the same format.
+OpenAI Create chat completion, and let you call **Azure OpenAI, Anthropic, Cohere, Replicate, OpenRouter** models in the same format.
In addition, liteLLM allows you to pass in the following **Optional** liteLLM args:
`forceTimeout`, `azure`, `logger_fn`, `verbose`
diff --git a/docs/supported.md b/docs/supported.md
index 713e7313fe..8b2aeca22e 100644
--- a/docs/supported.md
+++ b/docs/supported.md
@@ -54,6 +54,19 @@ Here are some examples of supported models:
| [google/flan-t5-xxl](https://huggingface.co/google/flan-t5-xxl) | `completion(model="google/flan-t5-xxl", messages=messages, hugging_face=True)` | `os.environ['HF_TOKEN']` |
| [google/flan-t5-large](https://huggingface.co/google/flan-t5-large) | `completion(model="google/flan-t5-large", messages=messages, hugging_face=True)` | `os.environ['HF_TOKEN']` |
+### OpenRouter Completion Models
+All the text models from [OpenRouter](https://openrouter.ai/docs) are supported by liteLLM.
-
+| Model Name | Function Call | Required OS Variables |
+|------------------|--------------------------------------------|--------------------------------------|
+| openai/gpt-3.5-turbo | `completion('openai/gpt-3.5-turbo', messages)` | `os.environ['OR_SITE_URL']`,
`os.environ['OR_APP_NAME']`,
`os.environ['OR_API_KEY']` |
+| openai/gpt-3.5-turbo-16k | `completion('openai/gpt-3.5-turbo-16k', messages)` | `os.environ['OR_SITE_URL']`,
`os.environ['OR_APP_NAME']`,
`os.environ['OR_API_KEY']` |
+| openai/gpt-4 | `completion('openai/gpt-4', messages)` | `os.environ['OR_SITE_URL']`,
`os.environ['OR_APP_NAME']`,
`os.environ['OR_API_KEY']` |
+| openai/gpt-4-32k | `completion('openai/gpt-4-32k', messages)` | `os.environ['OR_SITE_URL']`,
`os.environ['OR_APP_NAME']`,
`os.environ['OR_API_KEY']` |
+| anthropic/claude-2 | `completion('anthropic/claude-2', messages)` | `os.environ['OR_SITE_URL']`,
`os.environ['OR_APP_NAME']`,
`os.environ['OR_API_KEY']` |
+| anthropic/claude-instant-v1 | `completion('anthropic/claude-instant-v1', messages)` | `os.environ['OR_SITE_URL']`,
`os.environ['OR_APP_NAME']`,
`os.environ['OR_API_KEY']` |
+| google/palm-2-chat-bison | `completion('google/palm-2-chat-bison', messages)` | `os.environ['OR_SITE_URL']`,
`os.environ['OR_APP_NAME']`,
`os.environ['OR_API_KEY']` |
+| google/palm-2-codechat-bison | `completion('google/palm-2-codechat-bison', messages)` | `os.environ['OR_SITE_URL']`,
`os.environ['OR_APP_NAME']`,
`os.environ['OR_API_KEY']` |
+| meta-llama/llama-2-13b-chat | `completion('meta-llama/llama-2-13b-chat', messages)` | `os.environ['OR_SITE_URL']`,
`os.environ['OR_APP_NAME']`,
`os.environ['OR_API_KEY']` |
+| meta-llama/llama-2-70b-chat | `completion('meta-llama/llama-2-70b-chat', messages)` | `os.environ['OR_SITE_URL']`,
`os.environ['OR_APP_NAME']`,
`os.environ['OR_API_KEY']` |
\ No newline at end of file
From bc0986ad471b75266dd29fa250f8bd4f3cc6a32d Mon Sep 17 00:00:00 2001
From: Zakhar Kogan <36503576+zaharkogan@users.noreply.github.com>
Date: Fri, 11 Aug 2023 13:37:44 +0300
Subject: [PATCH 2/2] Added Infisical token to .env.example
---
.env.example | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.env.example b/.env.example
index 01e9752f17..36eff8a434 100644
--- a/.env.example
+++ b/.env.example
@@ -16,4 +16,6 @@ AZURE_API_KEY = ""
REPLICATE_API_KEY = ""
REPLICATE_API_TOKEN = ""
# Anthropic
-ANTHROPIC_API_KEY = ""
\ No newline at end of file
+ANTHROPIC_API_KEY = ""
+# Infisical
+INFISICAL_TOKEN = ""
\ No newline at end of file