Skip to content

Commit

Permalink
update zh docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shuang committed Oct 14, 2024
1 parent 7e4004e commit cc7c6c3
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions docs/zh_CN/source/models.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# 模型选择

当前GPTBioinsightor支持3家的大语言模型, 即
当前GPTBioinsightor支持多个大语言模型API
- openai的ChatGPT
- anthropic的Claude
- 阿里云的通义千问
- 智谱清言
- 月之暗面
- 深度求索
- siliconflow
- groq

GPTBioinsightor 提供3个参数来设置模型的选择:
- `provider`, 设置模型提供者,: "openai", "aliyun", "moonshot"
- `provider`, 设置模型提供者,例如: "openai", "aliyun", "anthropic"
- `model`, 具体模型
- `base_url` 自定义模型API接口

Expand All @@ -17,7 +22,7 @@ GPTBioinsightor 提供3个参数来设置模型的选择:
```python
### 设置ChatGPT的 API KEY
import os
os.environ['API_KEY'] = "sk-***"
os.environ['OPENAI_API_KEY'] = "sk-***"

import gptbioinsightor as gbi

Expand All @@ -28,7 +33,7 @@ background = "Cells are PBMCs from a Healthy Donor"
res = gbi.gpt_celltype(adata, background=background, out="gbi.md", provider="openai", model="gpt-4o-mini")

```

API KEY 获取方式:https://platform.openai.com/api-keys
更多模型参考:https://platform.openai.com/docs/models/


Expand All @@ -38,7 +43,7 @@ res = gbi.gpt_celltype(adata, background=background, out="gbi.md", provider="ope
```python
### 设置通义千问的 API KEY
import os
os.environ['API_KEY'] = "sk-***"
os.environ['ALIYUN_API_KEY'] = "sk-***"

import gptbioinsightor as gbi

Expand All @@ -48,32 +53,29 @@ background = "Cells are PBMCs from a Healthy Donor"
res = gbi.gpt_celltype(adata, background=background, out="gbi.md", provider="aliyun", model="qwen2-72b-instruct")

```

API KEY 获取方式:https://help.aliyun.com/zh/model-studio/developer-reference/get-api-key
更多模型参考:https://help.aliyun.com/zh/dashscope/developer-reference/tongyi-qianwen-7b-14b-72b-api-detailes


## 月之暗面
## Claude

示例用法:

```python
### 设置月之暗面的 API KEY
import os
os.environ['API_KEY'] = "sk-***"
os.environ['ANTHROPIC_API_KEY'] = "sk-***"

import gptbioinsightor as gbi

# 设置数据的背景信息
background = "Cells are PBMCs from a Healthy Donor"

res = gbi.gpt_celltype(adata, background=background, out="gbi.md", provider="moonshot", model="moonshot-v1-8k")
res = gbi.gpt_celltype(adata, background=background, out="gbi.md", provider="anthropic", model="claude-3-5-sonnet-20240620")

```

有3款模型:
- moonshot-v1-8k
- moonshot-v1-32k
- moonshot-v1-128k
API KEY 获取方式:https://console.anthropic.com/settings/keys
更多模型参考:https://console.anthropic.com/settings/keys

## 自定义API URL

Expand Down

0 comments on commit cc7c6c3

Please sign in to comment.