Skip to content

Commit 3bd3811

Browse files
committed
docs(api): added examples to 200 response codes
1 parent ad8bcff commit 3bd3811

1 file changed

Lines changed: 177 additions & 5 deletions

File tree

openapi.yaml

Lines changed: 177 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,26 @@ paths:
3030
responses:
3131
'200':
3232
description: Embeddings of legal texts produced by an Isaacus legal AI embedder.
33-
headers: {}
3433
content:
3534
application/json:
3635
schema:
3736
$ref: '#/components/schemas/EmbeddingResponse'
37+
examples:
38+
example:
39+
value:
40+
embeddings:
41+
- index: 0
42+
embedding:
43+
- -0.0258
44+
- 0.02062
45+
- -0.0114
46+
- index: 1
47+
embedding:
48+
- -0.0358
49+
- -0.0128
50+
- 0.00251
51+
usage:
52+
input_tokens: 42
3853
'400':
3954
description: The request was invalid or could not be processed.
4055
content:
@@ -192,7 +207,7 @@ paths:
192207
required: true
193208
responses:
194209
'200':
195-
description: The rankings of texts by relevance to a query.
210+
description: Request fulfilled, document follows
196211
headers: {}
197212
content:
198213
application/json:
@@ -358,11 +373,24 @@ paths:
358373
responses:
359374
'200':
360375
description: The results of extracting answers from texts.
361-
headers: {}
362376
content:
363377
application/json:
364378
schema:
365379
$ref: '#/components/schemas/AnswerExtractionResponse'
380+
examples:
381+
example:
382+
value:
383+
extractions:
384+
- index: 0
385+
answers:
386+
- text: 30 years if the person murdered was a police officer
387+
and 25 years in any other case
388+
start: 61
389+
end: 144
390+
score: 0.11460486645671249
391+
inextractability_score: 0.0027424068182309302
392+
usage:
393+
input_tokens: 43
366394
'400':
367395
description: The request was invalid or could not be processed.
368396
content:
@@ -515,11 +543,24 @@ paths:
515543
'200':
516544
description: Classifications of the relevance of legal documents to a query
517545
produced by an Isaacus universal legal AI classifier.
518-
headers: {}
519546
content:
520547
application/json:
521548
schema:
522549
$ref: '#/components/schemas/UniversalClassificationResponse'
550+
examples:
551+
example:
552+
value:
553+
classifications:
554+
- index: 0
555+
score: 0.8825573934438159
556+
chunks:
557+
- index: 0
558+
start: 0
559+
end: 46
560+
score: 0.8825573934438159
561+
text: I agree not to tell anyone about the document.
562+
usage:
563+
input_tokens: 19
523564
'400':
524565
description: The request was invalid or could not be processed.
525566
content:
@@ -679,11 +720,126 @@ paths:
679720
responses:
680721
'200':
681722
description: The enriched documents alongside usage statistics.
682-
headers: {}
683723
content:
684724
application/json:
685725
schema:
686726
$ref: '#/components/schemas/EnrichmentResponse'
727+
examples:
728+
example:
729+
value:
730+
results:
731+
- index: 0
732+
document:
733+
version: ilgs@1
734+
title: null
735+
subtitle: null
736+
type: other
737+
jurisdiction: US-FED
738+
segments:
739+
- id: seg:0
740+
kind: unit
741+
type: paragraph
742+
category: annotation
743+
type_name: null
744+
code:
745+
start: 0
746+
end: 4
747+
title: null
748+
parent: null
749+
span:
750+
start: 0
751+
end: 317
752+
crossreferences: []
753+
locations:
754+
- id: loc:0
755+
name:
756+
start: 308
757+
end: 315
758+
type: country
759+
parent: null
760+
mentions:
761+
- start: 308
762+
end: 315
763+
persons:
764+
- id: per:0
765+
name:
766+
start: 32
767+
end: 42
768+
type: natural
769+
role: defense_counsel
770+
parent: null
771+
residence: null
772+
mentions:
773+
- start: 32
774+
end: 42
775+
- id: per:1
776+
name:
777+
start: 167
778+
end: 176
779+
type: natural
780+
role: plaintiff
781+
parent: null
782+
residence: loc:0
783+
mentions:
784+
- start: 167
785+
end: 176
786+
emails: []
787+
websites: []
788+
phone_numbers: []
789+
id_numbers: []
790+
terms:
791+
- id: term:0
792+
name:
793+
start: 120
794+
end: 131
795+
meaning:
796+
start: 88
797+
end: 113
798+
mentions:
799+
- start: 237
800+
end: 248
801+
external_documents:
802+
- id: exd:0
803+
name:
804+
start: 66
805+
end: 72
806+
type: other
807+
jurisdiction: US-FED
808+
reception: neutral
809+
mentions:
810+
- start: 66
811+
end: 72
812+
pinpoints:
813+
- start: 54
814+
end: 58
815+
- id: exd:1
816+
name:
817+
start: 80
818+
end: 113
819+
type: statute
820+
jurisdiction: US-FED
821+
reception: neutral
822+
mentions:
823+
- start: 80
824+
end: 113
825+
pinpoints:
826+
- start: 79
827+
end: 84
828+
- start: 219
829+
end: 229
830+
quotes:
831+
- source_segment: null
832+
source_document: exd:0
833+
source_person: per:0
834+
amending: false
835+
span:
836+
start: 79
837+
end: 317
838+
dates: []
839+
headings: []
840+
junk: []
841+
usage:
842+
input_tokens: 91
687843
'400':
688844
description: The request was invalid or could not be processed.
689845
content:
@@ -3099,9 +3255,17 @@ components:
30993255
start:
31003256
type: integer
31013257
exclusiveMinimum: -1.0
3258+
description: The zero-based start index of the half-open span of Unicode
3259+
code points in the input text.
3260+
examples:
3261+
- 5805
31023262
end:
31033263
type: integer
31043264
exclusiveMinimum: -1.0
3265+
description: The zero-based end index of the half-open span (i.e., the end
3266+
is exclusive) of Unicode code points in the input text.
3267+
examples:
3268+
- 6036
31053269
type: object
31063270
required:
31073271
- end
@@ -4026,9 +4190,17 @@ components:
40264190
start:
40274191
type: integer
40284192
exclusiveMinimum: -1.0
4193+
description: The zero-based start index of the half-open span of Unicode
4194+
code points in the input text.
4195+
examples:
4196+
- 5805
40294197
end:
40304198
type: integer
40314199
exclusiveMinimum: -1.0
4200+
description: The zero-based end index of the half-open span (i.e., the end
4201+
is exclusive) of Unicode code points in the input text.
4202+
examples:
4203+
- 6036
40324204
type: object
40334205
required:
40344206
- end

0 commit comments

Comments
 (0)