---
title: "Oobabooga Text Web API 教學"
url: "/docs/tutorials/oobabooga"
canonical_url: "https://docs.litellm.ai/docs/tutorials/oobabooga"
type: "docs"
last_updated: "2026-10-08"
related:
  - "/docs/tutorials/finetuned_chat_gpt"
  - "/docs/tutorials/proxy_admin_access"
---
# Oobabooga Text Web API 教學

> Index of all LiteLLM docs: https://docs.litellm.ai/llms.txt


### 安裝 + 匯入 LiteLLM  {#install--import-litellm}
```bash
uv add litellm
```

```python
from litellm import completion 
import os
```

### 呼叫您的 oobabooga 模型 {#call-your-oobabooga-model}
請記得設定您的 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)
```

感謝 [Shuai Shao](https://www.linkedin.com/in/shuai-sh/) 提供本教學。

## Related pages

- [使用微調的 gpt-3.5-turbo](https://docs.litellm.ai/docs/tutorials/finetuned_chat_gpt.md)
- [Proxy: Admin & Access](https://docs.litellm.ai/docs/tutorials/proxy_admin_access.md)
