update docs for together ai

This commit is contained in:
Krrish Dholakia 2023-09-09 10:34:56 -07:00
parent b92bcfbdd9
commit 79ca4cd785
3 changed files with 32 additions and 1 deletions

View file

@ -3,7 +3,7 @@ displayed_sidebar: tutorialSidebar
--- ---
# Litellm # Litellm
import QueryParamReader from '../src/components/queryParamReader.js' import CrispChat from '../src/components/CrispChat.js'
[![PyPI Version](https://img.shields.io/pypi/v/litellm.svg)](https://pypi.org/project/litellm/) [![PyPI Version](https://img.shields.io/pypi/v/litellm.svg)](https://pypi.org/project/litellm/)
[![PyPI Version](https://img.shields.io/badge/stable%20version-v0.1.345-blue?color=green&link=https://pypi.org/project/litellm/0.1.1/)](https://pypi.org/project/litellm/0.1.1/) [![PyPI Version](https://img.shields.io/badge/stable%20version-v0.1.345-blue?color=green&link=https://pypi.org/project/litellm/0.1.1/)](https://pypi.org/project/litellm/0.1.1/)

View file

@ -8,6 +8,19 @@ import os
os.environ["TOGETHERAI_API_KEY"] = "" os.environ["TOGETHERAI_API_KEY"] = ""
``` ```
### Sample Usage
```python
from litellm import completion
# set env variable
os.environ["TOGETHERAI_API_KEY"] = ""
messages = [{"role": "user", "content": "Write me a poem about the blue sky"}]
completion(model="togethercomputer/Llama-2-7B-32K-Instruct", messages=messages, custom_llm_provider="together_ai")
```
### Together AI Models ### Together AI Models
liteLLM supports `non-streaming` and `streaming` requests to all models on https://api.together.xyz/ liteLLM supports `non-streaming` and `streaming` requests to all models on https://api.together.xyz/

View file

@ -0,0 +1,18 @@
import React, { useEffect } from 'react';
const CrispChat = () => {
useEffect(() => {
window.$crisp = [];
window.CRISP_WEBSITE_ID = "be07a4d6-dba0-4df7-961d-9302c86b7ebc";
const d = document;
const s = d.createElement("script");
s.src = "https://client.crisp.chat/l.js";
s.async = 1;
document.getElementsByTagName("head")[0].appendChild(s);
}, [])
return null;
};
export default CrispChat;