docs(proxy_server.md): adding chatdev tutorial to docs

This commit is contained in:
Krrish Dholakia 2023-10-17 12:38:01 -07:00
parent 38671ff740
commit e2248e27e5
2 changed files with 25 additions and 2 deletions

View file

@ -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
```

View file

@ -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