add bailian support (#1319)

Co-authored-by: Kent Dong <ch3cho@qq.com>
This commit is contained in:
rinfx
2024-09-18 16:35:13 +08:00
committed by GitHub
parent 0471249e7f
commit f51408d7ff
4 changed files with 58 additions and 8 deletions

View File

@@ -602,6 +602,51 @@ provider:
}
```
### 使用original协议代理百炼智能体应用
**配置信息**
```yaml
provider:
type: qwen
apiTokens:
- "YOUR_DASHSCOPE_API_TOKEN"
protocol: original
```
**请求实例**
```json
{
"input": {
"prompt": "介绍一下Dubbo"
},
"parameters": {},
"debug": {}
}
```
**响应实例**
```json
{
"output": {
"finish_reason": "stop",
"session_id": "677e7e8fbb874e1b84792b65042e1599",
"text": "Apache Dubbo 是一个..."
},
"usage": {
"models": [
{
"output_tokens": 449,
"model_id": "qwen-max",
"input_tokens": 282
}
]
},
"request_id": "b59e45e3-5af4-91df-b7c6-9d746fd3297c"
}
```
### 使用月之暗面配合其原生的文件上下文
提前上传文件至月之暗面,以文件内容作为上下文使用其 AI 服务。