From e2248e27e5f9eca33b88998ae830c36867b0f160 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 17 Oct 2023 12:38:01 -0700 Subject: [PATCH] docs(proxy_server.md): adding chatdev tutorial to docs --- docs/my-website/docs/completion/output.md | 5 +++-- docs/my-website/docs/proxy_server.md | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/my-website/docs/completion/output.md b/docs/my-website/docs/completion/output.md index eda86ac2782..f705bc9f311 100644 --- a/docs/my-website/docs/completion/output.md +++ b/docs/my-website/docs/completion/output.md @@ -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 ``` \ No newline at end of file diff --git a/docs/my-website/docs/proxy_server.md b/docs/my-website/docs/proxy_server.md index 5f80789a1e8..7e3a41835cf 100644 --- a/docs/my-website/docs/proxy_server.md +++ b/docs/my-website/docs/proxy_server.md @@ -288,6 +288,28 @@ admin.initiate_chat( Credits [@Nathan](https://gist.github.com/CUexter) for this tutorial. + + +### 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" +``` + ```python