diff --git a/docs/my-website/docs/tutorials/oobabooga.md b/docs/my-website/docs/tutorials/oobabooga.md new file mode 100644 index 000000000..9610143aa --- /dev/null +++ b/docs/my-website/docs/tutorials/oobabooga.md @@ -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. \ No newline at end of file diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js index b878aecaf..e5aed111a 100644 --- a/docs/my-website/sidebars.js +++ b/docs/my-website/sidebars.js @@ -90,6 +90,7 @@ const sidebars = { items: [ 'tutorials/azure_openai', 'tutorials/ab_test_llms', + 'tutorials/oobabooga', 'tutorials/huggingface_codellama', 'tutorials/huggingface_tutorial', 'tutorials/TogetherAI_liteLLM',