Skip to content

Commit 4d6d393

Browse files
committed
🚧 Rename role to author and remove HTTPValidationError
Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
1 parent c543e0d commit 4d6d393

File tree

1 file changed

+20
-50
lines changed

1 file changed

+20
-50
lines changed

docs/api/openapi_detector_api.yaml

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ paths:
6464
content:
6565
application/json:
6666
schema:
67-
$ref: '#/components/schemas/HTTPValidationError'
67+
$ref: '#/components/schemas/Error'
6868
/api/v1/text/generation:
6969
post:
7070
summary: Generation Analysis Unary Handler
@@ -114,7 +114,7 @@ paths:
114114
content:
115115
application/json:
116116
schema:
117-
$ref: '#/components/schemas/HTTPValidationError'
117+
$ref: '#/components/schemas/Error'
118118
/api/v1/text/context/chat:
119119
post:
120120
summary: Chat Analysis Unary Handler
@@ -166,7 +166,7 @@ paths:
166166
content:
167167
application/json:
168168
schema:
169-
$ref: '#/components/schemas/HTTPValidationError'
169+
$ref: '#/components/schemas/Error'
170170
/api/v1/text/context/doc:
171171
post:
172172
summary: Context Analysis Unary Handler
@@ -216,7 +216,7 @@ paths:
216216
content:
217217
application/json:
218218
schema:
219-
$ref: '#/components/schemas/HTTPValidationError'
219+
$ref: '#/components/schemas/Error'
220220
components:
221221
schemas:
222222
ChatAnalysisHttpRequest:
@@ -228,13 +228,13 @@ components:
228228
title: Chat History
229229
example:
230230
- content: You are a helpful assistant.
231-
role: system
231+
author: system
232232
- content: Hi, is this powered by siri or alexa?
233-
role: user
233+
author: user
234234
- content: Better, it's watsonx
235-
role: assistant
235+
author: assistant
236236
- content: This is awesome!
237-
role: user
237+
author: user
238238
type: object
239239
required:
240240
- chat_history
@@ -451,15 +451,6 @@ components:
451451
- detection_type
452452
- score
453453
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
463454
Error:
464455
type: object
465456
properties:
@@ -472,49 +463,49 @@ components:
472463
- message
473464
Message:
474465
properties:
475-
role:
466+
author:
476467
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''>]'
479470
content:
480471
type: string
481472
title: Content
482473
description: The text of the message
483474
type: object
484475
required:
485-
- role
476+
- author
486477
- content
487478
title: Message
488-
RoleEnum:
479+
AuthorEnum:
489480
type: string
490481
enum:
491482
- system
492483
- assistant
493484
- user
494-
title: RoleEnum
485+
title: AuthorEnum
495486
description: >-
496487
A collection of name/value pairs.
497488
498489
Access them by:
499490
500491
- attribute access::
501492
502-
>>> RoleEnum.system <RoleEnum.system: 'system'>
493+
>>> AuthorEnum.system <AuthorEnum.system: 'system'>
503494
504495
- value lookup:
505496
506-
>>> RoleEnum('system') <RoleEnum.system: 'system'>
497+
>>> AuthorEnum('system') <AuthorEnum.system: 'system'>
507498
508499
- name lookup:
509500
510-
>>> RoleEnum['system'] <RoleEnum.system: 'system'>
501+
>>> AuthorEnum['system'] <AuthorEnum.system: 'system'>
511502
512503
Enumerations can be iterated over, and know how many members they have:
513504
514-
>>> len(RoleEnum) 3
505+
>>> len(AuthorEnum) 3
515506
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'>]
518509
519510
Methods can be added to enumerations, and members can have their own
520511
attributes -- see the documentation for details.
@@ -564,24 +555,3 @@ components:
564555
- detection_type
565556
- score
566557
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

Comments
 (0)