Skip to content

Commit 4c01090

Browse files
authored
Merge pull request #36 from samselikoff/add-defaults
Add defaults for required request values
2 parents 6770828 + 068a399 commit 4c01090

1 file changed

Lines changed: 41 additions & 10 deletions

File tree

openapi.yaml

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,12 @@ paths:
249249
type: string
250250
description: A description of the desired images. Maximum length varies by model.
251251
example: cat floating in space, cinematic
252+
default: cat floating in space, cinematic
252253
model:
253254
type: string
254255
description: The model to use for image generation.
255256
example: stabilityai/stable-diffusion-xl-base-1.0
257+
default: stabilityai/stable-diffusion-xl-base-1.0
256258
steps:
257259
type: integer
258260
default: 20
@@ -414,7 +416,7 @@ paths:
414416
lora_alpha:
415417
type: integer
416418
default: 8
417-
description: The alpha value for LoRA adapter training.
419+
description: The alpha value for LoRA adapter training.
418420
lora_dropout:
419421
type: number
420422
format: float
@@ -607,10 +609,12 @@ components:
607609
type: string
608610
description: The model to be used for the rerank request.
609611
example: Salesforce/Llama-Rank-V1
612+
default: Salesforce/Llama-Rank-V1
610613
query:
611614
type: string
612615
description: The search query to be used for ranking.
613-
example: 'What animals can I find near Peru?'
616+
example: What animals can I find near Peru?
617+
default: What animals can I find near Peru?
614618
documents:
615619
description: List of documents, which can be either strings or objects.
616620
oneOf:
@@ -639,6 +643,23 @@ components:
639643
'title': 'Wild Bactrian camel',
640644
'text': 'The wild Bactrian camel (Camelus ferus) is an endangered species of camel endemic to Northwest China and southwestern Mongolia.',
641645
}
646+
default:
647+
- {
648+
'title': 'Llama',
649+
'text': 'The llama is a domesticated South American camelid, widely used as a meat and pack animal by Andean cultures since the pre-Columbian era.',
650+
}
651+
- {
652+
'title': 'Panda',
653+
'text': 'The giant panda (Ailuropoda melanoleuca), also known as the panda bear or simply panda, is a bear species endemic to China.',
654+
}
655+
- {
656+
'title': 'Guanaco',
657+
'text': 'The guanaco is a camelid native to South America, closely related to the llama. Guanacos are one of two wild South American camelids; the other species is the vicuña, which lives at higher elevations.',
658+
}
659+
- {
660+
'title': 'Wild Bactrian camel',
661+
'text': 'The wild Bactrian camel (Camelus ferus) is an endangered species of camel endemic to Northwest China and southwestern Mongolia.',
662+
}
642663
top_n:
643664
type: integer
644665
description: The number of top results to return.
@@ -829,11 +850,13 @@ components:
829850
prompt:
830851
type: string
831852
description: A string providing context for the model to complete.
832-
example: '<s>[INST] What is the capital of France? [/INST]'
853+
example: <s>[INST] What is the capital of France? [/INST]
854+
default: <s>[INST] What is the capital of France? [/INST]
833855
model:
834856
type: string
835857
description: The name of the model to query.
836858
example: mistralai/Mixtral-8x7B-Instruct-v0.1
859+
default: mistralai/Mixtral-8x7B-Instruct-v0.1
837860
max_tokens:
838861
type: integer
839862
description: The maximum number of tokens to generate.
@@ -899,9 +922,9 @@ components:
899922
description: Adjusts the likelihood of specific tokens appearing in the generated output.
900923
example: { '1024': -10.5, '105': 21.4 }
901924
seed:
902-
type: integer
903-
description: Seed value for reproducibility.
904-
example: 42
925+
type: integer
926+
description: Seed value for reproducibility.
927+
example: 42
905928
CompletionResponse:
906929
type: object
907930
properties:
@@ -959,7 +982,7 @@ components:
959982
- $ref: '#/components/schemas/UsageData'
960983
- nullable: true
961984
seed:
962-
type: integer
985+
type: integer
963986
finish_reason:
964987
allOf:
965988
- $ref: '#/components/schemas/FinishReason'
@@ -1072,10 +1095,16 @@ components:
10721095
required:
10731096
- role
10741097
- content
1098+
default:
1099+
- role: system
1100+
content: You are a helpful assistant
1101+
- role: user
1102+
content: What is 1 + 1?
10751103
model:
10761104
type: string
10771105
description: The name of the model to query.
10781106
example: mistralai/Mixtral-8x7B-Instruct-v0.1
1107+
default: mistralai/Mixtral-8x7B-Instruct-v0.1
10791108
max_tokens:
10801109
type: integer
10811110
description: The maximum number of tokens to generate.
@@ -1135,9 +1164,9 @@ components:
11351164
description: Adjusts the likelihood of specific tokens appearing in the generated output.
11361165
example: { '1024': -10.5, '105': 21.4 }
11371166
seed:
1138-
type: integer
1139-
description: Seed value for reproducibility.
1140-
example: 42
1167+
type: integer
1168+
description: Seed value for reproducibility.
1169+
example: 42
11411170
function_call:
11421171
oneOf:
11431172
- type: string
@@ -1438,6 +1467,7 @@ components:
14381467
type: string
14391468
description: The name of the embedding model to use.
14401469
example: togethercomputer/m2-bert-80M-8k-retrieval
1470+
default: togethercomputer/m2-bert-80M-8k-retrieval
14411471
input:
14421472
oneOf:
14431473
- type: string
@@ -1448,6 +1478,7 @@ components:
14481478
type: string
14491479
description: A string providing the text for the model to embed.
14501480
example: Our solar system orbits the Milky Way galaxy at about 515,000 mph
1481+
default: Our solar system orbits the Milky Way galaxy at about 515,000 mph
14511482

14521483
EmbeddingsResponse:
14531484
type: object

0 commit comments

Comments
 (0)