Skip to content

Commit a6aad01

Browse files
committed
Generated Darabonba for BailianChatBot-2024-11-05.
1 parent 6c856af commit a6aad01

File tree

9 files changed

+619
-0
lines changed

9 files changed

+619
-0
lines changed

bailianchatbot-20241105/Teafile

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
"scope": "alibabacloud",
3+
"name": "BailianChatBot20241105",
4+
"version": "1.0.0",
5+
"main": "./main.tea",
6+
"maintainers": [
7+
{
8+
"name": "Alibaba Cloud SDK",
9+
"email": "sdk-team@alibabacloud.com"
10+
}
11+
],
12+
"java": {
13+
"package": "com.aliyun.bailianchatbot20241105",
14+
"enableMinimizeModelName": false,
15+
"packageInfo": {
16+
"description": "Alibaba Cloud BailianChatBot (20241105) SDK for Java",
17+
"url": "https://github.com/aliyun/alibabacloud-java-sdk",
18+
"licenseName": "The Apache License, Version 2.0",
19+
"licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt",
20+
"developerId": "aliyunproducts",
21+
"developerName": "Aliyun SDK",
22+
"developerEmail": "aliyunsdk@aliyun.com"
23+
}
24+
},
25+
"releases": {
26+
"java": "com.aliyun:bailianchatbot20241105:1.0.0",
27+
"go": "github.com/alibabacloud-go/bailianchatbot-20241105/client:v1.0.0",
28+
"csharp": "AlibabaCloud.SDK.BailianChatBot20241105:1.0.0",
29+
"ts": "@alicloud/bailianchatbot20241105:1.0.0",
30+
"php": "alibabacloud/bailianchatbot-20241105:1.0.0",
31+
"python": "alibabacloud_bailianchatbot20241105:1.0.0",
32+
"python2": "alibabacloud_bailianchatbot20241105_py2:0.0.1",
33+
"swift": "alibabacloud-sdk-swift/bailianchatbot-20241105:1.0.0"
34+
},
35+
"libraries": {
36+
"OpenApi": "alibabacloud:OpenApi:*",
37+
"Util": "darabonba:Util:*",
38+
"OpenApiUtil": "alibabacloud:OpenApiUtil:*",
39+
"EndpointUtil": "alibabacloud:EndpointUtil:*",
40+
"SPI": "alibabacloud:GatewaySPI:*",
41+
"GatewayClient": "alibabacloud:GatewayPOP:*",
42+
"Paginator": "alibabacloud:Paginator:*"
43+
},
44+
"csharp": {
45+
"className": "Client",
46+
"namespace": "AlibabaCloud.SDK.BailianChatBot20241105",
47+
"packageInfo": {
48+
"name": "bailianchatbot",
49+
"title": "alibabacloud-bailianchatbot",
50+
"description": "Alibaba Cloud BailianChatBot (20241105) SDK Library for .NET",
51+
"company": "Alibaba Cloud",
52+
"property": {
53+
"PackageTags": "Alibaba Aliyun BailianChatBot SDK",
54+
"Copyright": "©2009-present Alibaba Cloud",
55+
"PackageProjectUrl": "https://github.com/aliyun/alibabacloud-csharp-sdk",
56+
"PackageIconUrl": "https://www.alibabacloud.com/favicon.ico"
57+
}
58+
}
59+
},
60+
"php": {
61+
"package": "AlibabaCloud.SDK.BailianChatBot.V20241105",
62+
"clientName": "BailianChatBot",
63+
"packageInfo": {
64+
"name": "alibabacloud/bailianchatbot-20241105",
65+
"desc": "Alibaba Cloud BailianChatBot (20241105) SDK Library for PHP",
66+
"github": "https://github.com/aliyun/alibabacloud-php-sdk",
67+
"files": {
68+
"LICENSE": "../LICENSE"
69+
}
70+
}
71+
},
72+
"python": {
73+
"package": "alibabacloud_bailianchatbot20241105",
74+
"clientName": "client",
75+
"packageInfo": {
76+
"name": "alibabacloud_bailianchatbot20241105",
77+
"desc": "Alibaba Cloud BailianChatBot (20241105) SDK Library for Python",
78+
"github": "https://github.com/aliyun/alibabacloud-python-sdk",
79+
"author": "Alibaba Cloud SDK",
80+
"email": "sdk-team@alibabacloud.com"
81+
}
82+
},
83+
"python2": {
84+
"package": "alibabacloud_bailianchatbot20241105",
85+
"clientName": "client",
86+
"packageInfo": {
87+
"name": "alibabacloud_bailianchatbot20241105_py2",
88+
"desc": "Alibaba Cloud BailianChatBot (20241105) SDK Library for Python2",
89+
"github": "https://github.com/aliyun/alibabacloud-python2-sdk",
90+
"author": "Alibaba Cloud SDK",
91+
"email": "sdk-team@alibabacloud.com"
92+
}
93+
},
94+
"cpp": {
95+
"packageInfo": {
96+
"git": {
97+
"scope": "alibabacloud-sdk-cpp",
98+
"project": "bailianchatbot-20241105"
99+
}
100+
}
101+
},
102+
"swift": {
103+
"clientName": "Client",
104+
"packageInfo": {
105+
"name": "AlibabacloudBailianChatBot20241105",
106+
"desc": "Alibaba Cloud BailianChatBot (20241105) SDK Library for Swift",
107+
"github": "https://github.com/alibabacloud-sdk-swift/bailianchatbot-20241105",
108+
"author": "Alibaba Cloud SDK",
109+
"email": "sdk-team@alibabacloud.com"
110+
}
111+
},
112+
"go": {
113+
"mapAndSliceWithoutOmitempty": false
114+
},
115+
"productId": "BailianChatBot",
116+
"apiVersions": "2024-11-05"
117+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"product": "BailianChatBot",
3+
"version": "2024-11-05",
4+
"apiDoc": {
5+
"hasDoc": [
6+
"SseChat"
7+
],
8+
"noDoc": []
9+
},
10+
"deprecated": [],
11+
"endpoints": {}
12+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"scope": "alibabacloud",
3+
"name": "BailianChatBot20241105-async",
4+
"version": "1.0.0",
5+
"main": "./main.dara",
6+
"productId": "bailianchatbot",
7+
"apiVersions": "20241105",
8+
"signVersion": "v2",
9+
"maintainers": [
10+
{
11+
"name": "Alibaba Cloud SDK",
12+
"email": "sdk-team@alibabacloud.com"
13+
}
14+
],
15+
"java": {
16+
"package": "com.aliyun.sdk.service.bailianchatbot20241105",
17+
"className": "DefaultAsyncClient",
18+
"implements": "AsyncClient",
19+
"packageInfo": {
20+
"description": "Alibaba Cloud BailianChatBot (20241105) Async SDK for Java",
21+
"url": "https://github.com/aliyun/alibabacloud-java-async-sdk",
22+
"licenseName": "The Apache License, Version 2.0",
23+
"licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt",
24+
"developerId": "aliyunproducts",
25+
"developerName": "Aliyun SDK",
26+
"developerEmail": "aliyunsdk@aliyun.com"
27+
}
28+
},
29+
"releases": {
30+
"java": "com.aliyun:alibabacloud-bailianchatbot20241105:0.0.1"
31+
},
32+
"libraries": {
33+
"TeaRequest": "alibabacloud:DarabonbaCore.TeaRequest:*",
34+
"AsyncRequestBody": "alibabacloud:DarabonbaCore.AsyncRequestBody:*",
35+
"RequestBody": "alibabacloud:DarabonbaCore.RequestBody:*",
36+
"AsyncResponseHandler": "alibabacloud:DarabonbaCore.AsyncResponseHandler:*",
37+
"ClientConfiguration": "alibabacloud:DarabonbaCore.ClientConfiguration:*",
38+
"ClientExecutionParams": "alibabacloud:DarabonbaCore.ClientExecutionParams:*",
39+
"TeaAsyncHandler": "alibabacloud:DarabonbaCore.TeaAsyncHandler:*",
40+
"BaseClientBuilder": "alibabacloud:DarabonbaCore.Pop:*"
41+
}
42+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"product": "BailianChatBot",
3+
"version": "2024-11-05",
4+
"apiDoc": {
5+
"hasDoc": [
6+
"SseChat"
7+
],
8+
"noDoc": []
9+
},
10+
"deprecated": [],
11+
"endpoints": {}
12+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
*
3+
*/
4+
import BaseClientBuilder;
5+
import TeaAsyncHandler;
6+
import TeaRequest;
7+
import AsyncRequestBody;
8+
import RequestBody;
9+
import AsyncResponseHandler;
10+
import ClientConfiguration;
11+
import ClientExecutionParams;
12+
extends BaseClientBuilder;
13+
type @product = string
14+
type @version = string
15+
type @endpointRule = string
16+
type @endpointMap = map[string]string
17+
type @REQUEST = TeaRequest
18+
type @handler = TeaAsyncHandler
19+
20+
init(configuration: ClientConfiguration){
21+
@handler = new TeaAsyncHandler(configuration);
22+
@product = 'BailianChatBot';
23+
@version = '2024-11-05';
24+
@endpointRule = '';
25+
@endpointMap = {
26+
};
27+
}
28+
29+
function close(): void {
30+
@handler.close();
31+
}
32+
33+
model SseChatRequest {
34+
regionId?: string(name='RegionId', position='Host'),
35+
appId: string(name='AppId', description='This parameter is required.', example='chatbot-cn-dDmF3jcdVf', position='Query'),
36+
command?: string(name='Command', example='TIMEOUT', position='Query'),
37+
senderId?: string(name='SenderId', example='uid129312098593', position='Query'),
38+
senderNick?: string(name='SenderNick', position='Query'),
39+
sessionId?: string(name='SessionId', example='15e04f27-acd7-489d-872f-1d68f7535e33', position='Query'),
40+
utterance: string(name='Utterance', description='This parameter is required.', position='Query'),
41+
vendorParam?: string(name='VendorParam', position='Query'),
42+
workspaceId: string(name='WorkspaceId', description='This parameter is required.', example='llm-g7jspxljq8k909h3', position='Query'),
43+
}
44+
45+
model SseChatResponseBody = {
46+
code?: string(name='Code', example='200'),
47+
data?: any(name='Data'),
48+
message?: string(name='Message', example='success'),
49+
requestId?: string(name='RequestId', example='30D68C4C-4512-58A7-A328-568015B39A02'),
50+
success?: boolean(name='Success', example='True'),
51+
}
52+
53+
model SseChatResponse = {
54+
headers?: map[string]string(name='headers'),
55+
statusCode?: int32(name='statusCode'),
56+
body?: SseChatResponseBody(name='body'),
57+
}
58+
59+
/**
60+
* @param request the request parameters of SseChat SseChatRequest
61+
* @return SseChatResponse
62+
*/
63+
async function sseChat(request: SseChatRequest): SseChatResponse {
64+
@handler.validateRequestModel(request);
65+
return @handler.do('RPC', 'SseChat', 'POST', '/sse/bailian/chat', 'json', false, 'json', request);
66+
}
67+
68+
function sseChatWithResponseIterable(request: SseChatRequest): iterator[SseChatResponseBody] {
69+
@handler.validateRequestModel(request);
70+
yield @handler.doSSERequest('SSE', 'SseChat', 'POST', '/sse/bailian/chat', 'json', false, 'json', request);
71+
}
72+

bailianchatbot-20241105/main.tea

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
/**
2+
*
3+
*/
4+
import Util;
5+
import OpenApi;
6+
import OpenApiUtil;
7+
import EndpointUtil;
8+
9+
extends OpenApi;
10+
11+
12+
init(config: OpenApi.Config){
13+
super(config);
14+
@endpointRule = '';
15+
16+
checkConfig(config);
17+
@endpoint = getEndpoint('bailianchatbot', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
18+
}
19+
20+
function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
21+
if (!Util.empty(endpoint)) {
22+
return endpoint;
23+
}
24+
25+
if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
26+
return endpointMap[regionId];
27+
}
28+
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
29+
}
30+
31+
model SseChatRequest {
32+
appId?: string(name='AppId', description='This parameter is required.', example='chatbot-cn-dDmF3jcdVf'),
33+
command?: string(name='Command', example='TIMEOUT'),
34+
senderId?: string(name='SenderId', example='uid129312098593'),
35+
senderNick?: string(name='SenderNick'),
36+
sessionId?: string(name='SessionId', example='15e04f27-acd7-489d-872f-1d68f7535e33'),
37+
utterance?: string(name='Utterance', description='This parameter is required.', nullable=false),
38+
vendorParam?: string(name='VendorParam'),
39+
workspaceId?: string(name='WorkspaceId', description='This parameter is required.', example='llm-g7jspxljq8k909h3'),
40+
}
41+
42+
model SseChatResponseBody = {
43+
code?: string(name='Code', example='200'),
44+
data?: any(name='Data'),
45+
message?: string(name='Message', example='success'),
46+
requestId?: string(name='RequestId', example='30D68C4C-4512-58A7-A328-568015B39A02'),
47+
success?: boolean(name='Success', example='True'),
48+
}
49+
50+
model SseChatResponse = {
51+
headers?: map[string]string(name='headers'),
52+
statusCode?: int32(name='statusCode'),
53+
body?: SseChatResponseBody(name='body'),
54+
}
55+
56+
/**
57+
* @summary SSE问答接口
58+
*
59+
* @param request SseChatRequest
60+
* @param runtime runtime options for this request RuntimeOptions
61+
* @return SseChatResponse
62+
*/
63+
async function sseChatWithOptions(request: SseChatRequest, runtime: Util.RuntimeOptions): SseChatResponse {
64+
Util.validateModel(request);
65+
var query = {};
66+
if (!Util.isUnset(request.appId)) {
67+
query['AppId'] = request.appId;
68+
}
69+
if (!Util.isUnset(request.command)) {
70+
query['Command'] = request.command;
71+
}
72+
if (!Util.isUnset(request.senderId)) {
73+
query['SenderId'] = request.senderId;
74+
}
75+
if (!Util.isUnset(request.senderNick)) {
76+
query['SenderNick'] = request.senderNick;
77+
}
78+
if (!Util.isUnset(request.sessionId)) {
79+
query['SessionId'] = request.sessionId;
80+
}
81+
if (!Util.isUnset(request.utterance)) {
82+
query['Utterance'] = request.utterance;
83+
}
84+
if (!Util.isUnset(request.vendorParam)) {
85+
query['VendorParam'] = request.vendorParam;
86+
}
87+
if (!Util.isUnset(request.workspaceId)) {
88+
query['WorkspaceId'] = request.workspaceId;
89+
}
90+
var req = new OpenApi.OpenApiRequest{
91+
query = OpenApiUtil.query(query),
92+
};
93+
var params = new OpenApi.Params{
94+
action = 'SseChat',
95+
version = '2024-11-05',
96+
protocol = 'HTTPS',
97+
pathname = '/',
98+
method = 'POST',
99+
authType = 'AK',
100+
style = 'RPC',
101+
reqBodyType = 'formData',
102+
bodyType = 'json',
103+
};
104+
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
105+
return callApi(params, req, runtime);
106+
} else {
107+
return execute(params, req, runtime);
108+
}
109+
}
110+
111+
/**
112+
* @summary SSE问答接口
113+
*
114+
* @param request SseChatRequest
115+
* @return SseChatResponse
116+
*/
117+
async function sseChat(request: SseChatRequest): SseChatResponse {
118+
var runtime = new Util.RuntimeOptions{};
119+
return sseChatWithOptions(request, runtime);
120+
}
121+

0 commit comments

Comments
 (0)