Skip to content

Commit

Permalink
add sample
Browse files Browse the repository at this point in the history
  • Loading branch information
liu599 committed Sep 8, 2024
1 parent d21a934 commit 8c4449b
Showing 1 changed file with 74 additions and 2 deletions.
76 changes: 74 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,81 @@

## 大模型API实验

`
```
curl --location 'http://localhost:5010/fischl_api/v1/chat_api' \
--header 'Content-Type: application/json' \
--data '{
"model": "azure",
"q": "《守护甜心》的作者是谁?"
}'
`
```

返回
```
{
"code": 20000,
"data": {
"message": {
"content": "《守护甜心》(Shugo Chara!)的作者是PEACH-PIT,这是一个由两位日本女性漫画家组成的团队,成员包括樱井日菜子(日名:桜井 日菜子,Sakurai Hinako)和秋田光彦(日名:秋田 光彦,Akita Mikihiko)。《守护甜心》是他们创作的一部非常受欢迎的少女漫画,讲述了主角日奈森亚梦与她的守护角色们的故事。",
"metadata": {
"content_filter_results": {
"hate": {
"filtered": false,
"severity": "safe"
},
"self_harm": {
"filtered": false,
"severity": "safe"
},
"sexual": {
"filtered": false,
"severity": "safe"
},
"violence": {
"filtered": false,
"severity": "safe"
}
},
"finish_reason": "stop",
"logprobs": null,
"model_name": "gpt-4",
"prompt_filter_results": [
{
"content_filter_results": {
"hate": {
"filtered": false,
"severity": "safe"
},
"self_harm": {
"filtered": false,
"severity": "safe"
},
"sexual": {
"filtered": false,
"severity": "safe"
},
"violence": {
"filtered": false,
"severity": "safe"
}
},
"prompt_index": 0
}
],
"system_fingerprint": "fp_e49e4201a9",
"token_usage": {
"completion_tokens": 171,
"prompt_tokens": 22,
"total_tokens": 193
}
},
"run_id": "run-ac807686-14d6-47f5-b6c0-46c091301230-0"
}
},
"message": "操作成功"
}
```


0 comments on commit 8c4449b

Please sign in to comment.