mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
docs(proxy_server.md): adding chatdev tutorial to docs
This commit is contained in:
parent
38671ff740
commit
e2248e27e5
2 changed files with 25 additions and 2 deletions
|
|
@ -56,12 +56,13 @@ Here's what an example response looks like
|
|||
You can also access information like latency.
|
||||
|
||||
```python
|
||||
import litellm
|
||||
from litellm import completion
|
||||
import os
|
||||
os.environ["ANTHROPIC_API_KEY"] = "your-api-key"
|
||||
|
||||
messages=[{"role": "user", "content": "Hey!"}]
|
||||
|
||||
response = completion(model="claude-2", messages=messages)
|
||||
|
||||
print(response.response_ms) # 616.25
|
||||
print(response.response_ms) # 616.25# 616.25
|
||||
```
|
||||
|
|
@ -288,6 +288,28 @@ admin.initiate_chat(
|
|||
|
||||
Credits [@Nathan](https://gist.github.com/CUexter) for this tutorial.
|
||||
</TabItem>
|
||||
<TabItem value="chatDev" label="ChatDev">
|
||||
|
||||
### Setup ChatDev ([Docs](https://github.com/OpenBMB/ChatDev#%EF%B8%8F-quickstart))
|
||||
```shell
|
||||
git clone https://github.com/OpenBMB/ChatDev.git
|
||||
cd ChatDev
|
||||
conda create -n ChatDev_conda_env python=3.9 -y
|
||||
conda activate ChatDev_conda_env
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
### Run ChatDev w/ Proxy
|
||||
```shell
|
||||
export OPENAI_API_KEY="sk-1234"
|
||||
```
|
||||
|
||||
```shell
|
||||
export OPENAI_API_BASE="http://0.0.0.0:8000"
|
||||
```
|
||||
```shell
|
||||
python3 run.py --task "a script that says hello world" --name "hello world"
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="langroid" label="Langroid">
|
||||
|
||||
```python
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue