64
64
content :
65
65
application/json :
66
66
schema :
67
- $ref : ' #/components/schemas/HTTPValidationError '
67
+ $ref : ' #/components/schemas/Error '
68
68
/api/v1/text/generation :
69
69
post :
70
70
summary : Generation Analysis Unary Handler
@@ -114,7 +114,7 @@ paths:
114
114
content :
115
115
application/json :
116
116
schema :
117
- $ref : ' #/components/schemas/HTTPValidationError '
117
+ $ref : ' #/components/schemas/Error '
118
118
/api/v1/text/context/chat :
119
119
post :
120
120
summary : Chat Analysis Unary Handler
@@ -166,7 +166,7 @@ paths:
166
166
content :
167
167
application/json :
168
168
schema :
169
- $ref : ' #/components/schemas/HTTPValidationError '
169
+ $ref : ' #/components/schemas/Error '
170
170
/api/v1/text/context/doc :
171
171
post :
172
172
summary : Context Analysis Unary Handler
@@ -216,7 +216,7 @@ paths:
216
216
content :
217
217
application/json :
218
218
schema :
219
- $ref : ' #/components/schemas/HTTPValidationError '
219
+ $ref : ' #/components/schemas/Error '
220
220
components :
221
221
schemas :
222
222
ChatAnalysisHttpRequest :
@@ -228,13 +228,13 @@ components:
228
228
title : Chat History
229
229
example :
230
230
- content : You are a helpful assistant.
231
- role : system
231
+ author : system
232
232
- content : Hi, is this powered by siri or alexa?
233
- role : user
233
+ author : user
234
234
- content : Better, it's watsonx
235
- role : assistant
235
+ author : assistant
236
236
- content : This is awesome!
237
- role : user
237
+ author : user
238
238
type : object
239
239
required :
240
240
- chat_history
@@ -451,15 +451,6 @@ components:
451
451
- detection_type
452
452
- score
453
453
title : GenerationAnalysisResponse
454
- HTTPValidationError :
455
- properties :
456
- detail :
457
- items :
458
- $ref : ' #/components/schemas/ValidationError'
459
- type : array
460
- title : Detail
461
- type : object
462
- title : HTTPValidationError
463
454
Error :
464
455
type : object
465
456
properties :
@@ -472,49 +463,49 @@ components:
472
463
- message
473
464
Message :
474
465
properties :
475
- role :
466
+ author :
476
467
allOf :
477
- - $ref : ' #/components/schemas/RoleEnum '
478
- description : ' Who wrote the message: [<enum '' RoleEnum '' >]'
468
+ - $ref : ' #/components/schemas/AuthorEnum '
469
+ description : ' Who wrote the message: [<enum '' AuthorEnum '' >]'
479
470
content :
480
471
type : string
481
472
title : Content
482
473
description : The text of the message
483
474
type : object
484
475
required :
485
- - role
476
+ - author
486
477
- content
487
478
title : Message
488
- RoleEnum :
479
+ AuthorEnum :
489
480
type : string
490
481
enum :
491
482
- system
492
483
- assistant
493
484
- user
494
- title : RoleEnum
485
+ title : AuthorEnum
495
486
description : >-
496
487
A collection of name/value pairs.
497
488
498
489
Access them by:
499
490
500
491
- attribute access::
501
492
502
- >>> RoleEnum .system <RoleEnum .system: 'system'>
493
+ >>> AuthorEnum .system <AuthorEnum .system: 'system'>
503
494
504
495
- value lookup:
505
496
506
- >>> RoleEnum ('system') <RoleEnum .system: 'system'>
497
+ >>> AuthorEnum ('system') <AuthorEnum .system: 'system'>
507
498
508
499
- name lookup:
509
500
510
- >>> RoleEnum ['system'] <RoleEnum .system: 'system'>
501
+ >>> AuthorEnum ['system'] <AuthorEnum .system: 'system'>
511
502
512
503
Enumerations can be iterated over, and know how many members they have:
513
504
514
- >>> len(RoleEnum ) 3
505
+ >>> len(AuthorEnum ) 3
515
506
516
- >>> list(RoleEnum ) [<RoleEnum .system: 'system'>, <RoleEnum .assistant:
517
- 'assistant'>, <RoleEnum .user: 'user'>]
507
+ >>> list(AuthorEnum ) [<AuthorEnum .system: 'system'>, <AuthorEnum .assistant:
508
+ 'assistant'>, <AuthorEnum .user: 'user'>]
518
509
519
510
Methods can be added to enumerations, and members can have their own
520
511
attributes -- see the documentation for details.
@@ -564,24 +555,3 @@ components:
564
555
- detection_type
565
556
- score
566
557
title : TextAnalysisResponse
567
- ValidationError :
568
- properties :
569
- loc :
570
- items :
571
- anyOf :
572
- - type : string
573
- - type : integer
574
- type : array
575
- title : Location
576
- msg :
577
- type : string
578
- title : Message
579
- type :
580
- type : string
581
- title : Error Type
582
- type : object
583
- required :
584
- - loc
585
- - msg
586
- - type
587
- title : ValidationError
0 commit comments