Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README_CN - Model Configuration #1535

Merged
merged 2 commits into from
Dec 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update README_CN - Model Configuration
The original model configuration guide is misleading, it tells readers to configure model provider by change the `XAI_MODEL` parameters.

But this is for the XAI configurations, i update the description completely with the right configuration steps.
  • Loading branch information
RedHorse823 committed Dec 28, 2024
commit 428018294f9098b8f97ae36a95f48c99d81d7360
48 changes: 45 additions & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,55 @@ pnpm start

## 配置不同的大模型

### 配置Llama
您可以使用不同的大模型来驱动您的AI Agent,切换不同大模型需要两步:

您可以通过设置 `XAI_MODEL` 环境变量为 `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` 或 `meta-llama/Meta-Llama-3.1-405B-Instruct` 来运行 Llama 70B 或 405B 模型
1. 确认您在`.env`文件内配置了对应的大模型API Key或对应的访问配置,例如如果您想使用OpenAI,则需要找到`OPENAI_API_KEY`参数,并填入您的OpenAI API Key,并以此类推。
2. 在您的*Character*文件里找到`modelProvider`,并更改这里的内容,例如如果想要切换到Claude,则需要填入`anthropic`,以此来表明您将使用anthropic大模型作为您的对应Agent的Provider.

在`.env`文件内您可以找到不同大模型的详细配置,包括设定具体想要使用对应提供商的哪个模型,下方我们给出了两个实例:

### 配置OpenAI

您可以通过设置 `XAI_MODEL` 环境变量为 `gpt-4o-mini` 或 `gpt-4o` 来运行 OpenAI 模型
首先您需要在Character文件内指定model provider

```json
"name": "C-3PO",
"clients": [],
"modelProvider": "openai"
...
```

其次请在`env`文件内配置相关参数

```
# AI Model API Keys
OPENAI_API_KEY= # OpenAI API key, starting with sk-
SMALL_OPENAI_MODEL= # Default: gpt-4o-mini
MEDIUM_OPENAI_MODEL= # Default: gpt-4o
LARGE_OPENAI_MODEL= # Default: gpt-4o
EMBEDDING_OPENAI_MODEL= # Default: text-embedding-3-small
IMAGE_OPENAI_MODEL= # Default: dall-e-3

```

### 配置Anthorpic

```json
"name": "C-3PO",
"clients": [],
"modelProvider": "anthropic"
...
```

其次请在`env`文件内配置相关参数

```
# Anthropic Configuration
ANTHROPIC_API_KEY= # For Claude
SMALL_ANTHROPIC_MODEL= # Default: claude-3-haiku-20240307
MEDIUM_ANTHROPIC_MODEL= # Default: claude-3-5-sonnet-20241022
LARGE_ANTHROPIC_MODEL= # Default: claude-3-5-sonnet-20241022
```

## 其他要求

Expand Down
Loading