From a384c5cf707c4666ba13d769b784546945e55e4e 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] 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 a9b8f3f2c..5d3ba77a5 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 713e7313f..8b2aeca22 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