Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bincooo committed Jun 22, 2024
1 parent 3a04860 commit 3be8ee5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ coze:
lmsys:
> 无需cookie, model参数为 `lmsys/` 前缀,例:`lmsys/claude-3-haiku-20240307`
> 该接口有第三方监管,但用来进行正向对话还是不错的。对ip严苛
>
> fn_index、trigger_id 获取:进入[主页](https://chat.lmsys.org/),选择Direct Chat 发送一次对话,F12抓取join里的对应参数
>
> 两种配置化,1. 请求头携带 `Authorization: [49, 109]`, 2. config.yaml中配置 `lmsys: [49, 109]`
custom:
> 实现chatgpt规范的上游AI接口,可用此定义来实现toolCall的功能
Expand Down
1 change: 1 addition & 0 deletions internal/plugin/llm/lmsys/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ func partOne(ctx context.Context, proxies, token string, opts *options, messages
}

func extCookies(token string) (fn []int) {
token = strings.TrimSpace(token)
if len(token) > 2 && token[0] == '[' && token[len(token)-1] == ']' {
var slice []int
err := json.Unmarshal([]byte(token), &slice)
Expand Down

0 comments on commit 3be8ee5

Please sign in to comment.