File size: 1,075 Bytes
aba79e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
title: ddchat
emoji: 🦀
colorFrom: indigo
colorTo: blue
sdk: docker
pinned: true
app_port: 7860
short_description: ddchat
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

# 请求

* 获取模式
  
``` bash
curl https://sanbo1200-ddghat.hf.space/models
```

*  发起对话请求
```  bash
curl --location --request POST 'https://sanbo1200-ddghat.hf.space/completions' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "model": "gpt-4o-mini",
      "messages": [
          {
              "role": "user",
              "content": "你是什么模型?你的知识库截止到什么时间?"
          }
      ],
      "stream": true
  }'


curl --location --request POST 'http://0.0.0.0:8760/completions' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "model": "gpt-4o-mini",
      "messages": [
          {
              "role": "user",
              "content": "你是什么模型?你的知识库截止到什么时间?"
          }
      ],
      "stream": true
  }'

```