add oobabooga tutorial docs

This commit is contained in:
Krrish Dholakia 2023-09-27 21:27:57 -07:00
parent 5932eb0e4b
commit 94eba84cf0
2 changed files with 27 additions and 0 deletions

View 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.