From 94eba84cf0d48e337d4206f47d966fa97fe86624 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 27 Sep 2023 21:27:57 -0700 Subject: [PATCH] add oobabooga tutorial docs --- docs/my-website/docs/tutorials/oobabooga.md | 26 +++++++++++++++++++++ docs/my-website/sidebars.js | 1 + 2 files changed, 27 insertions(+) create mode 100644 docs/my-website/docs/tutorials/oobabooga.md diff --git a/docs/my-website/docs/tutorials/oobabooga.md b/docs/my-website/docs/tutorials/oobabooga.md new file mode 100644 index 00000000000..9610143aa30 --- /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 b878aecafc6..e5aed111ac5 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',