Oobabooga Text Web API Tutorial
Install + Import LiteLLMβ
!uv add litellm
from litellm import completion
import os
Call your oobabooga modelβ
Remember to set your api_base
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β
print(response)
Credits to Shuai Shao, for this tutorial.