-
Notifications
You must be signed in to change notification settings - Fork 12
/
openapi.yaml
2142 lines (2099 loc) · 63.7 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: Together APIs
description: The Together REST API. Please see https://docs.together.ai for more details.
version: "2.0.0"
termsOfService: https://www.together.ai/terms-of-service
contact:
name: Together Support
url: https://www.together.ai/contact
license:
name: MIT
url: https://github.com/togethercomputer/openapi/blob/main/LICENSE
servers:
- url: https://api.together.xyz/v1
security:
- bearerAuth: []
paths:
/chat/completions:
post:
tags: ["Chat"]
summary: Create chat completion
description: Query a chat model.
operationId: chat-completions
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ChatCompletionRequest"
responses:
"200":
description: "200"
content:
application/json:
schema:
$ref: "#/components/schemas/ChatCompletionResponse"
text/event-stream:
schema:
$ref: "#/components/schemas/ChatCompletionStream"
"400":
description: "BadRequest"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"401":
description: "Unauthorized"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"404":
description: "NotFound"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"429":
description: "RateLimit"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"503":
description: "Overloaded"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"504":
description: "Timeout"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
deprecated: false
/completions:
post:
tags: ["Completion"]
summary: Create completion
description: Query a language, code, or image model.
operationId: completions
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CompletionRequest"
responses:
"200":
description: "200"
content:
application/json:
schema:
$ref: "#/components/schemas/CompletionResponse"
text/event-stream:
schema:
$ref: "#/components/schemas/CompletionStream"
"400":
description: "BadRequest"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"401":
description: "Unauthorized"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"404":
description: "NotFound"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"429":
description: "RateLimit"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"503":
description: "Overloaded"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"504":
description: "Timeout"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
deprecated: false
/embeddings:
post:
tags: ["Embeddings"]
summary: Create embedding
description: Query an embedding model for a given string of text.
operationId: embeddings
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/EmbeddingsRequest"
responses:
"200":
description: "200"
content:
application/json:
schema:
$ref: "#/components/schemas/EmbeddingsResponse"
"400":
description: "BadRequest"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"401":
description: "Unauthorized"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"404":
description: "NotFound"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"429":
description: "RateLimit"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"503":
description: "Overloaded"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"504":
description: "Timeout"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
deprecated: false
/models:
get:
tags: ["Models"]
summary: List all models
description: Lists all of Together's open-source models
operationId: models
responses:
"200":
description: "200"
content:
application/json:
schema:
$ref: "#/components/schemas/ModelInfoList"
"400":
description: "BadRequest"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"401":
description: "Unauthorized"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"404":
description: "NotFound"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"429":
description: "RateLimit"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"504":
description: "Timeout"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
deprecated: false
/images/generations:
post:
tags: ["Images"]
summary: Create image
description: Use an image model to generate an image for a given prompt.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- prompt
- model
properties:
prompt:
type: string
description: A description of the desired images. Maximum length varies by model.
example: cat floating in space, cinematic
model:
type: string
description: >
The model to use for image generation.<br>
<br>
[See all of Together AI's image models](https://docs.together.ai/docs/serverless-models#image-models)
example: black-forest-labs/FLUX.1-schnell
anyOf:
- type: string
enum:
- black-forest-labs/FLUX.1-schnell-Free
- black-forest-labs/FLUX.1-schnell
- black-forest-labs/FLUX.1.1-pro
- type: string
steps:
type: integer
default: 20
description: Number of generation steps.
image_url:
type: string
description: URL of an image to use for image models that support it.
seed:
type: integer
description: Seed used for generation. Can be used to reproduce image generations.
n:
type: integer
default: 1
description: Number of image results to generate.
height:
type: integer
default: 1024
description: Height of the image to generate in number of pixels.
width:
type: integer
default: 1024
description: Width of the image to generate in number of pixels.
negative_prompt:
type: string
description: The prompt or prompts not to guide the image generation.
response_format:
type: string
description: Format of the image response. Can be either a base64 string or a URL.
enum:
- base64
- url
responses:
"200":
description: Image generated successfully
content:
application/json:
schema:
$ref: "#/components/schemas/ImageResponse"
/files:
get:
tags: ["Files"]
summary: List all files
description: List the metadata for all uploaded data files.
responses:
"200":
description: List of files
content:
application/json:
schema:
$ref: "#/components/schemas/FileList"
/files/{id}:
get:
tags: ["Files"]
summary: List file
description: List the metadata for a single uploaded data file.
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: File retrieved successfully
content:
application/json:
schema:
$ref: "#/components/schemas/FileResponse"
delete:
tags: ["Files"]
summary: Delete a file
description: Delete a previously uploaded data file.
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: File deleted successfully
content:
application/json:
schema:
$ref: "#/components/schemas/FileDeleteResponse"
/files/{id}/content:
get:
tags: ["Files"]
summary: Get file contents
description: Get the contents of a single uploaded data file.
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: File content retrieved successfully
content:
application/json:
schema:
$ref: "#/components/schemas/FileObject"
"500":
description: Internal Server Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
/fine-tunes:
post:
tags: ["Fine-tuning"]
summary: Create job
description: Use a model to create a fine-tuning job.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- training_file
- model
properties:
training_file:
type: string
description: File-ID of a training file uploaded to the Together API
validation_file:
type: string
description: File-ID of a validation file uploaded to the Together API
model:
type: string
description: Name of the base model to run fine-tune job on
n_epochs:
type: integer
default: 1
description: Number of epochs for fine-tuning
n_checkpoints:
type: integer
default: 1
description: Number of checkpoints to save during fine-tuning
n_evals:
type: integer
default: 0
description: Number of evaluations to be run on a given validation set during training
batch_size:
type: integer
default: 32
description: Batch size for fine-tuning
learning_rate:
type: number
format: float
default: 0.00001
description: Learning rate multiplier to use for training
lr_scheduler:
type: object
default: none
$ref: "#/components/schemas/LRScheduler"
warmup_ratio:
type: number
format: float
default: 0.0
description: The percent of steps at the start of training to linearly increase the learning rate.
max_grad_norm:
type: number
format: float
default: 1.0
description: Max gradient norm to be used for gradient clipping. Set to 0 to disable.
weight_decay:
type: number
format: float
default: 0.0
description: Weight decay
suffix:
type: string
description: Suffix that will be added to your fine-tuned model name
wandb_api_key:
type: string
description: API key for Weights & Biases integration
wandb_base_url:
type: string
description: The base URL of a dedicated Weights & Biases instance.
wandb_project_name:
type: string
description: The Weights & Biases project for your run. If not specified, will use `together` as the project name.
wandb_name:
type: string
description: The Weights & Biases name for your run.
train_on_inputs:
oneOf:
- type: boolean
- type: string
enum:
- auto
type: boolean
default: auto
description: Whether to mask the user messages in conversational data or prompts in instruction data.
training_type:
type: object
oneOf:
- $ref: "#/components/schemas/FullTrainingType"
- $ref: "#/components/schemas/LoRATrainingType"
responses:
"200":
description: Fine-tuning job initiated successfully
content:
application/json:
schema:
$ref: "#/components/schemas/FinetuneResponse"
get:
tags: ["Fine-tuning"]
summary: List all jobs
description: List the metadata for all fine-tuning jobs.
responses:
"200":
description: List of fine-tune jobs
content:
application/json:
schema:
$ref: "#/components/schemas/FinetuneList"
/fine-tunes/{id}:
get:
tags: ["Fine-tuning"]
summary: List job
description: List the metadata for a single fine-tuning job.
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: Fine-tune job details retrieved successfully
content:
application/json:
schema:
$ref: "#/components/schemas/FinetuneResponse"
/fine-tunes/{id}/events:
get:
tags: ["Fine-tuning"]
summary: List job events
description: List the events for a single fine-tuning job.
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: List of fine-tune events
content:
application/json:
schema:
$ref: "#/components/schemas/FinetuneListEvents"
/finetune/download:
get:
tags: ["Fine-tuning"]
summary: Download model
description: Download a compressed fine-tuned model or checkpoint to local disk.
parameters:
- in: query
name: ft_id
schema:
type: string
required: true
description: Fine-tune ID to download. A string that starts with `ft-`.
- in: query
name: checkpoint_step
schema:
type: integer
required: false
description: Specifies step number for checkpoint to download. Ignores `checkpoint` value if set.
- in: query
name: checkpoint
schema:
type: string
enum:
- merged
- adapter
description: Specifies checkpoint type to download - `merged` vs `adapter`. This field is required if the checkpoint_step is not set.
- in: query
name: output
schema:
type: string
required: false
description: Specifies output file name for downloaded model. Defaults to `$PWD/{model_name}.{extension}`.
responses:
"200":
description: Successfully downloaded the fine-tuned model or checkpoint.
content:
application/json:
schema:
$ref: "#/components/schemas/FinetuneDownloadResult"
"400":
description: Invalid request parameters.
"404":
description: Fine-tune ID not found.
/fine-tunes/{id}/cancel:
post:
tags: ["Fine-tuning"]
summary: Cancel job
description: Cancel a currently running fine-tuning job.
parameters:
- in: path
name: id
schema:
type: string
required: true
description: Fine-tune ID to cancel. A string that starts with `ft-`.
responses:
"200":
description: Successfully cancelled the fine-tuning job.
content:
application/json:
schema:
$ref: "#/components/schemas/FinetuneResponse"
"400":
description: Invalid request parameters.
"404":
description: Fine-tune ID not found.
/rerank:
post:
tags: ["Rerank"]
summary: Create a rerank request
description: Query a reranker model
operationId: rerank
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/RerankRequest"
responses:
"200":
description: "200"
content:
application/json:
schema:
$ref: "#/components/schemas/RerankResponse"
"400":
description: "BadRequest"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"401":
description: "Unauthorized"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"404":
description: "NotFound"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"429":
description: "RateLimit"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"503":
description: "Overloaded"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
"504":
description: "Timeout"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorData"
deprecated: false
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
x-bearer-format: bearer
x-default: default
schemas:
RerankRequest:
type: object
properties:
model:
type: string
description: >
The model to be used for the rerank request.<br>
<br>
[See all of Together AI's rerank models](https://docs.together.ai/docs/serverless-models#rerank-models)
example: Salesforce/Llama-Rank-V1
anyOf:
- type: string
enum:
- Salesforce/Llama-Rank-v1
- type: string
query:
type: string
description: The search query to be used for ranking.
example: What animals can I find near Peru?
documents:
description: List of documents, which can be either strings or objects.
oneOf:
- type: array
items:
type: object
additionalProperties: true
- type: array
items:
type: string
example: Our solar system orbits the Milky Way galaxy at about 515,000 mph
example:
- {
"title": "Llama",
"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.",
}
- {
"title": "Panda",
"text": "The giant panda (Ailuropoda melanoleuca), also known as the panda bear or simply panda, is a bear species endemic to China.",
}
- {
"title": "Guanaco",
"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.",
}
- {
"title": "Wild Bactrian camel",
"text": "The wild Bactrian camel (Camelus ferus) is an endangered species of camel endemic to Northwest China and southwestern Mongolia.",
}
top_n:
type: integer
description: The number of top results to return.
example: 2
return_documents:
type: boolean
description: Whether to return supplied documents with the response.
example: true
rank_fields:
type: array
items:
type: string
description: List of keys in the JSON Object document to rank by. Defaults to use all supplied keys for ranking.
example: ["title", "text"]
required:
- model
- query
- documents
additionalProperties: false
RerankResponse:
type: object
required:
- object
- model
- results
properties:
object:
type: string
description: Object type
enum:
- rerank
example: rerank
id:
type: string
description: Request ID
example: 9dfa1a09-5ebc-4a40-970f-586cb8f4ae47
model:
type: string
description: The model to be used for the rerank request.
example: salesforce/turboranker-0.8-3778-6328
results:
type: array
items:
type: object
required: [index, relevance_score, document]
properties:
index:
type: integer
relevance_score:
type: number
document:
type: object
properties:
text:
type: string
nullable: true
example:
- {
"index": 0,
"relevance_score": 0.29980177813003117,
"document":
{
"text": '{"title":"Llama","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."}',
},
}
- {
"index": 2,
"relevance_score": 0.2752447527354349,
"document":
{
"text": '{"title":"Guanaco","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."}',
},
}
usage:
$ref: "#/components/schemas/UsageData"
example:
{
"prompt_tokens": 1837,
"completion_tokens": 0,
"total_tokens": 1837,
}
ErrorData:
type: object
required:
- error
properties:
error:
type: object
properties:
message:
type: string
nullable: false
type:
type: string
nullable: false
param:
type: string
nullable: true
default: null
code:
type: string
nullable: true
default: null
required:
- type
- message
- param
- code
FinishReason:
type: string
enum:
- stop
- eos
- length
- tool_calls
- function_call
LogprobsPart:
type: object
properties:
token_ids:
type: array
items:
type: number
description: List of token IDs corresponding to the logprobs
tokens:
type: array
items:
type: string
description: List of token strings
token_logprobs:
type: array
items:
type: number
description: List of token log probabilities
PromptPart:
type: array
items:
type: object
properties:
text:
type: string
example: <s>[INST] What is the capital of France? [/INST]
logprobs:
$ref: "#/components/schemas/LogprobsPart"
UsageData:
type: object
properties:
prompt_tokens:
type: integer
completion_tokens:
type: integer
total_tokens:
type: integer
required:
- prompt_tokens
- completion_tokens
- total_tokens
nullable: true
CompletionChoicesData:
type: array
items:
type: object
properties:
text:
type: string
example: The capital of France is Paris. It's located in the north-central part of the country and is one of the most populous and visited cities in the world, known for its iconic landmarks like the Eiffel Tower, Louvre Museum, Notre-Dame Cathedral, and more. Paris is also the capital of the Île-de-France region and is a major global center for art, fashion, gastronomy, and culture.
seed:
type: integer
finish_reason:
$ref: "#/components/schemas/FinishReason"
logprobs:
type: object
$ref: "#/components/schemas/LogprobsPart"
CompletionRequest:
type: object
required:
- model
- prompt
properties:
prompt:
type: string
description: A string providing context for the model to complete.
example: <s>[INST] What is the capital of France? [/INST]
model:
type: string
description: >
The name of the model to query.<br>
<br>
[See all of Together AI's chat models](https://docs.together.ai/docs/serverless-models#chat-models)
example: mistralai/Mixtral-8x7B-Instruct-v0.1
anyOf:
- type: string
enum:
- meta-llama/Llama-2-70b-hf
- mistralai/Mistral-7B-v0.1
- mistralai/Mixtral-8x7B-v0.1
- Meta-Llama/Llama-Guard-7b
- type: string
max_tokens:
type: integer
description: The maximum number of tokens to generate.
stop:
type: array
description: A list of string sequences that will truncate (stop) inference text output. For example, "</s>" will stop generation as soon as the model generates the given token.
items:
type: string
temperature:
type: number
description: A decimal number from 0-1 that determines the degree of randomness in the response. A temperature less than 1 favors more correctness and is appropriate for question answering or summarization. A value closer to 1 introduces more randomness in the output.
format: float
top_p:
type: number
description: A percentage (also called the nucleus parameter) that's used to dynamically adjust the number of choices for each predicted token based on the cumulative probabilities. It specifies a probability threshold below which all less likely tokens are filtered out. This technique helps maintain diversity and generate more fluent and natural-sounding text.
format: float
top_k:
type: integer
description: An integer that's used to limit the number of choices for the next predicted word or token. It specifies the maximum number of tokens to consider at each step, based on their probability of occurrence. This technique helps to speed up the generation process and can improve the quality of the generated text by focusing on the most likely options.
format: int32
repetition_penalty:
type: number
description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition.
format: float
stream:
type: boolean
description: "If true, stream tokens as Server-Sent Events as the model generates them instead of waiting for the full model response. The stream terminates with `data: [DONE]`. If false, return a single JSON object containing the results."
logprobs:
type: integer
minimum: 0
maximum: 1
description: Determines the number of most likely tokens to return at each token position log probabilities to return.
echo:
type: boolean
description: If true, the response will contain the prompt. Can be used with `logprobs` to return prompt logprobs.
n:
type: integer
description: The number of completions to generate for each prompt.
minimum: 1
maximum: 128
safety_model:
type: string
description: The name of the moderation model used to validate tokens. Choose from the available moderation models found [here](https://docs.together.ai/docs/inference-models#moderation-models).
example: "safety_model_name"
anyOf:
- type: string
enum:
- Meta-Llama/Llama-Guard-7b
- type: string
min_p:
type: number
description: A number between 0 and 1 that can be used as an alternative to top-p and top-k.
format: float
presence_penalty:
type: number
description: A number between -2.0 and 2.0 where a positive value increases the likelihood of a model talking about new topics.
format: float
frequency_penalty:
type: number
description: A number between -2.0 and 2.0 where a positive value decreases the likelihood of repeating tokens that have already been mentioned.
format: float
logit_bias:
type: object
additionalProperties:
type: number
format: float
description: Adjusts the likelihood of specific tokens appearing in the generated output.
example: { "1024": -10.5, "105": 21.4 }
seed:
type: integer
description: Seed value for reproducibility.
example: 42
CompletionResponse:
type: object
properties:
id:
type: string
choices:
$ref: "#/components/schemas/CompletionChoicesData"
prompt:
$ref: "#/components/schemas/PromptPart"
usage:
$ref: "#/components/schemas/UsageData"
created:
type: integer
model:
type: string
object:
type: string
enum:
- text_completion
required:
- id
- choices