forked from phoenix/litellm-mirror
update docs for together ai
This commit is contained in:
parent
b92bcfbdd9
commit
79ca4cd785
3 changed files with 32 additions and 1 deletions
|
@ -3,7 +3,7 @@ displayed_sidebar: tutorialSidebar
|
||||||
---
|
---
|
||||||
# Litellm
|
# Litellm
|
||||||
|
|
||||||
import QueryParamReader from '../src/components/queryParamReader.js'
|
import CrispChat from '../src/components/CrispChat.js'
|
||||||
|
|
||||||
[](https://pypi.org/project/litellm/)
|
[](https://pypi.org/project/litellm/)
|
||||||
[](https://pypi.org/project/litellm/0.1.1/)
|
[](https://pypi.org/project/litellm/0.1.1/)
|
||||||
|
|
|
@ -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/
|
||||||
|
|
||||||
|
|
18
docs/my-website/src/components/CrispChat.js
Normal file
18
docs/my-website/src/components/CrispChat.js
Normal 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;
|
Loading…
Add table
Add a link
Reference in a new issue