forked from phoenix/litellm-mirror
add oobabooga tutorial docs
This commit is contained in:
parent
5932eb0e4b
commit
94eba84cf0
2 changed files with 27 additions and 0 deletions
26
docs/my-website/docs/tutorials/oobabooga.md
Normal file
26
docs/my-website/docs/tutorials/oobabooga.md
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# Oobabooga Text Web API Tutorial
|
||||||
|
|
||||||
|
### Install + Import LiteLLM
|
||||||
|
```python
|
||||||
|
!pip install litellm
|
||||||
|
from litellm import completion
|
||||||
|
import os
|
||||||
|
```
|
||||||
|
|
||||||
|
### Call your oobabooga model
|
||||||
|
Remember to set your api_base
|
||||||
|
```python
|
||||||
|
response = completion(
|
||||||
|
model="oobabooga/WizardCoder-Python-7B-V1.0-GPTQ",
|
||||||
|
messages=[{ "content": "can you write a binary tree traversal preorder","role": "user"}],
|
||||||
|
api_base="http://localhost:5000",
|
||||||
|
max_tokens=4000
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
### See your response
|
||||||
|
```python
|
||||||
|
print(response)
|
||||||
|
```
|
||||||
|
|
||||||
|
Credits to [Shuai Shao](https://www.linkedin.com/in/shuai-sh/), for this tutorial.
|
|
@ -90,6 +90,7 @@ const sidebars = {
|
||||||
items: [
|
items: [
|
||||||
'tutorials/azure_openai',
|
'tutorials/azure_openai',
|
||||||
'tutorials/ab_test_llms',
|
'tutorials/ab_test_llms',
|
||||||
|
'tutorials/oobabooga',
|
||||||
'tutorials/huggingface_codellama',
|
'tutorials/huggingface_codellama',
|
||||||
'tutorials/huggingface_tutorial',
|
'tutorials/huggingface_tutorial',
|
||||||
'tutorials/TogetherAI_liteLLM',
|
'tutorials/TogetherAI_liteLLM',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue