-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.yaml
4060 lines (4019 loc) · 114 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.0.2
info:
title: Pulze.ai API
description: >-
At Pulze it's our mission to supercharge today's workforce with AI to
maximize the world's prosperity. We are doing so by enabling companies of
any size to securely leverage Large Language Models (LLM) and easily build
AI features into their apps. Our enterprise platform has access to all best
in class LLMs and can route user requests to the most relevant model to get
the highest quality response at the best price thanks to our smart meta
model. End users can leverage pre-built applications, such as our Marketing
AI product, or build custom apps on top of the Pulze Platform.
We are a VC Funded, early stage startup based in San Francisco.
version: 0.1.0
servers:
- url: https://api.pulze.ai
tags:
- name: chat
- name: models
- name: logs
paths:
/v1/chat/completions:
post:
tags:
- chat
summary: Chat Completions
operationId: Chat_performCompletionRequest
security:
- HTTPBearer: []
description: Perform a Chat Completion request.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CompletionRequestPayload'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PulzeEngineResponseChatCompletion'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/models/rank:
post:
tags:
- models
summary: Get Rank Of Best Models For Payload
operationId: Models_getRankOfBest
security:
- HTTPBearer: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CompletionRequestPayload'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PulzeEngineModelRanking'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/logs/{log_id}:
get:
tags:
- logs
summary: Get Log By Id
operationId: Logs_getById
security:
- HTTPBearer: []
description: >-
Get a specific log by id. If accessing via API Key, this endpoint will
only return a log if it belongs to that App.
If the log's App is disabled, this endpoint won't return it.
parameters:
- in: path
name: log_id
required: true
schema:
title: Log Id
format: uuid
type: string
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Request_Normalized'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
AcceptInviteRequest:
title: AcceptInviteRequest
properties:
accept:
title: Accept
description: Whether user accepts(1) or declines(0) invitation
default: '1'
enum:
- '0'
- '1'
type: string
email:
title: Email
type: string
token:
title: Token
type: string
required:
- email
- token
type: object
App:
title: App
properties:
description:
title: Description
type: string
added_on:
title: Added On
format: date-time
type: string
auth0_id:
title: Auth0 Id
type: string
hashed_key:
title: Hashed Key
type: string
id:
title: Id
format: uuid
type: string
is_active:
title: Is Active
type: boolean
key_end:
title: Key End
type: string
modified_on:
title: Modified On
format: date-time
type: string
org_id:
title: Org Id
format: uuid
type: string
policies:
$ref: '#/components/schemas/LLMModelPolicies'
prompt_id:
title: Prompt Id
format: uuid
type: string
rate_limit:
title: Rate Limit
default: 200
type: integer
settings:
title: Settings
type: object
weights:
$ref: '#/components/schemas/LLMModelWeights'
required:
- hashed_key
- key_end
- description
- is_active
- auth0_id
- id
type: object
AppCreateData:
title: AppCreateData
properties:
description:
title: Description
type: string
policies:
$ref: '#/components/schemas/LLMModelPolicies'
weights:
$ref: '#/components/schemas/LLMModelWeights'
type: object
AppCreateResponse:
title: AppCreateResponse
properties:
description:
title: Description
type: string
app_id:
title: App Id
format: uuid
type: string
created_key:
title: Created Key
type: string
key_end:
title: Key End
type: string
required:
- app_id
type: object
AppCustomData:
title: AppCustomData
properties:
added_on:
title: Added On
description: The timestamp the file was added
format: date-time
type: string
app_id:
title: App Id
description: The ID of the App it's associated with
format: uuid
type: string
data_type:
title: Data Type
description: The type of custom data (file, database, ...)
enum:
- file
type: string
file_content:
title: File Content
description: The contents of the file
format: binary
type: string
file_mime:
title: File Mime
description: The mimetype of the file
type: string
file_name:
title: File Name
description: The name of the file
type: string
file_size:
title: File Size
description: The size of the file in Bytes
type: integer
id:
title: Id
description: The ID
format: uuid
type: string
required:
- app_id
- file_name
- file_mime
- data_type
type: object
AppDeleteResponse:
title: AppDeleteResponse
properties:
id:
title: Id
format: uuid
type: string
type: object
AppUpdate:
title: AppUpdate
properties:
description:
title: Description
minLength: 1
type: string
id:
title: Id
format: uuid
type: string
policies:
$ref: '#/components/schemas/LLMModelPolicies'
prompt_id:
title: Prompt Id
description: Prompt ID that we will use for requests
format: uuid
type: string
weights:
$ref: '#/components/schemas/LLMModelWeights'
required:
- id
- description
- weights
- policies
type: object
AppWithModelUpdatesInfo:
title: AppWithModelUpdatesInfo
properties:
app:
$ref: '#/components/schemas/App'
files:
title: Files
description: List of files associated with the app.
default: []
items:
$ref: '#/components/schemas/AppCustomData'
type: array
model_settings:
title: Model Settings
additionalProperties:
$ref: '#/components/schemas/PulzeModelActiveForApp'
type: object
required:
- app
- model_settings
type: object
Auth0PostRegistrationRequest:
title: Auth0PostRegistrationRequest
properties:
created_at:
title: Created At
default: ''
type: string
email:
title: Email
type: string
email_verified:
title: Email Verified
default: false
type: boolean
extra_info:
title: Extra Info
type: object
family_name:
title: Family Name
default: ''
type: string
given_name:
title: Given Name
default: ''
type: string
name:
title: Name
default: ''
type: string
nickname:
title: Nickname
default: ''
type: string
phone_number:
title: Phone Number
default: ''
type: string
phone_verified:
title: Phone Verified
default: false
type: boolean
picture:
title: Picture
default: ''
type: string
user_id:
title: User Id
type: string
required:
- user_id
- email
type: object
Auth0PostRegistrationResponse:
title: Auth0PostRegistrationResponse
properties:
created:
title: Created
type: boolean
exists:
title: Exists
type: boolean
updated:
title: Updated
type: boolean
required:
- exists
- created
- updated
type: object
BillingAddPayment:
title: BillingAddPayment
properties:
payment_id:
title: Payment Id
type: string
return_url:
title: Return Url
type: string
required:
- payment_id
- return_url
type: object
BillingAddPaymentResult:
title: BillingAddPaymentResult
properties:
confirm_url:
title: Confirm Url
type: string
result:
title: Result
type: string
required:
- result
type: object
BillingPaymentCoupon:
title: BillingPaymentCoupon
properties:
amount_off:
title: Amount Off
type: string
currency:
title: Currency
enum:
- USD
type: string
id:
title: Id
type: string
name:
title: Name
type: string
required:
- name
- id
- amount_off
- currency
type: object
BillingPaymentCreation:
title: BillingPaymentCreation
properties:
intent_key:
title: Intent Key
type: string
public_key:
title: Public Key
type: string
required:
- public_key
- intent_key
type: object
BillingPaymentInfo:
title: BillingPaymentInfo
properties:
balance:
$ref: '#/components/schemas/PaymentDetailsBalance'
default_card:
title: Default Card
type: string
discount:
$ref: '#/components/schemas/BillingPaymentCoupon'
payments:
title: Payments
items: {}
type: array
subscriptions:
title: Subscriptions
items:
$ref: '#/components/schemas/BillingSubscription'
type: array
required:
- payments
- balance
- subscriptions
type: object
BillingSubscription:
title: BillingSubscription
properties:
description:
title: Description
type: string
amount:
title: Amount
type: number
currency:
title: Currency
type: string
current_period_end:
title: Current Period End
type: integer
current_period_start:
title: Current Period Start
type: integer
latest_invoice:
title: Latest Invoice
type: string
product:
title: Product
type: string
quantity:
title: Quantity
type: integer
start_date:
title: Start Date
type: integer
required:
- latest_invoice
- amount
- currency
- quantity
- start_date
- current_period_end
- current_period_start
- description
- product
type: object
BillingTopUp:
title: BillingTopUp
properties:
amount:
title: Amount
description: 'Amount of the currency to top up: $3.00, €4.22, ..., as a float'
type: number
currency:
title: Currency
enum:
- USD
type: string
payment_id:
title: Payment Id
description: The (stripe) ID of the customer's payment method. Optional for now
type: string
return_url:
title: Return Url
type: string
required:
- amount
- currency
- return_url
type: object
BillingTransactionItem:
title: BillingTransactionItem
properties:
description:
title: Description
type: string
amount:
title: Amount
anyOf:
- type: integer
- type: number
balance:
title: Balance
anyOf:
- type: integer
- type: number
created:
title: Created
anyOf:
- type: integer
- format: date-time
type: string
currency:
title: Currency
enum:
- USD
type: string
id:
title: Id
type: string
invoice_status:
title: Invoice Status
type: string
link:
title: Link
type: string
link_pdf:
title: Link Pdf
type: string
metadata:
title: Metadata
type: object
type:
title: Type
type: string
required:
- id
- amount
- currency
- created
- type
type: object
BillingTransactions:
title: BillingTransactions
properties:
data:
title: Data
description: The list of Transaction items
default: []
items:
$ref: '#/components/schemas/BillingTransactionItem'
type: array
type: object
Body_app_upload_custom_data_v1_apps_custom_data__app_id__post:
title: Body_app_upload_custom_data_v1_apps_custom_data__app_id__post
properties:
files:
title: Files
items:
format: binary
type: string
type: array
required:
- files
type: object
CompletionRequestPayload:
title: CompletionRequestPayload
properties:
best_of:
title: Best Of
description: >-
The number of responses to _generate_. Out of those, it will return
the best `n`.
default: 1
type: integer
'false':
title: false
description: |
How many completions to generate for each prompt.
@default 1
default: 1
minimum: 1
type: integer
frequency_penalty:
title: Frequency Penalty
description: >
https://platform.openai.com/docs/api-reference/completions/create#completions/create-frequency_penalty
Increase the model's likelihood to not repeat tokens/words
default: 0
maximum: 2
type: number
logit_bias:
title: Logit Bias
description: >
COMING SOON
https://platform.openai.com/docs/api-reference/completions/create#completions/create-logit_bias
Modify the likelihood of specified tokens appearing in the
completion.
See here for a detailed explanation on how to use:
https://help.openai.com/en/articles/5247780-using-logit-bias-to-define-token-probability
type: object
logprobs:
title: Logprobs
description: >
COMING SOON
https://platform.openai.com/docs/api-reference/completions/create#completions/create-logprobs
Include the log probabilities on the logprobs most likely tokens, as
well the chosen tokens.
maximum: 5
type: integer
max_tokens:
title: Max Tokens
description: The maximum number of tokens that the response can contain.
type: integer
messages:
title: Messages
description: >-
The conversation sent (with or without history) (for a
/chat/completions request)
default: []
items:
$ref: '#/components/schemas/RoleContentChatChoice'
type: array
model:
title: Model
description: >
https://docs.pulze.ai/overview/models
Specify the model you'd like Pulze to use. (optional). Can be the
full model name, or a subset for multi-matching.
Defaults to our dynamic routing, i.e. best model for this request.
default: pulze
type: string
presence_penalty:
title: Presence Penalty
description: >
https://platform.openai.com/docs/api-reference/completions/create#completions/create-presence_penalty
Increase the model's likelihood to talk about new topics
default: 0
maximum: 2
type: number
prompt:
title: Prompt
description: The prompt text sent (for a /completions request)
anyOf:
- type: string
- items:
type: string
type: array
stop:
title: Stop
description: >
Stop responding when this sequence of characters is generated. Leave
empty to allow the model to decide.
anyOf:
- type: string
- items:
type: string
type: array
default: ''
stream:
title: Stream
description: >
** COMING SOON **
Specify if you want the response to be streamed or to be returned as
a standard HTTP request
default: false
type: boolean
suffix:
title: Suffix
description: COMING SOON
default: ''
type: string
temperature:
title: Temperature
description: >-
Optionally specify the temperature for this request only. Leave
empty to allow Pulze to guess it for you.
default: 1
maximum: 1
type: number
tool_choice:
title: Tool Choice
anyOf:
- enum:
- none
- auto
type: string
- $ref: '#/components/schemas/ToolChoice'
default: none
tools:
title: Tools
items:
$ref: '#/components/schemas/ToolFunction'
type: array
top_p:
title: Top P
description: >
https://platform.openai.com/docs/api-reference/completions/create#completions/create-top_p
An alternative to sampling with temperature, called nucleus
sampling, where the model considers the results of the tokens with
top_p probability mass
default: 1
type: number
type: object
ConversationShare:
title: ConversationShare
properties:
title:
title: Title
description: A title for this conversation
type: string
auth0_id:
title: Auth0 Id
description: >-
The Auth0-ID of the user that shared this. Could be used by a user
to share a conversation between their different organizations (as
long as they open it themselves)
type: string
continuation_of:
title: Continuation Of
description: >-
Will be used for analytics. We can know from which conversation this
was shared.
type: string
hashed_ids:
title: Hashed Ids
description: >-
To avoid creating duplicated shared links, we use this value as a
quick way to verify that we are receiving new IDs
type: string
is_public:
title: Is Public
description: >-
Whether the conversation is shared publicly or only members of your
organization
default: true
type: boolean
org_id:
title: Org Id
description: >-
The organization that shared this. Important, as it can be used to
filter users belonging to different organizations
format: uuid
type: string
share_hash:
title: Share Hash
description: The HASH that was shared. Used to fetch all the conversation items
type: string
shared_on:
title: Shared On
description: Some extra information, like when was the conversation shared
format: date-time
type: string
required:
- share_hash
- shared_on
- title
type: object
ConversationShareRequest:
title: ConversationShareRequest
properties:
continuation_of:
title: Continuation Of
description: If this playground was started from another existing conversation.
type: string
ids:
title: Ids
description: >-
A list (of list) of Request IDs of all the messages that need to be
shared in the playground.
items:
items:
format: uuid
type: string
type: array
type: array
is_public:
title: Is Public
description: >-
Set to True/False if you want it available for anyone with the link,
or only members within the organization
default: true
type: boolean
required:
- ids
type: object
ConversationSharedData:
title: ConversationSharedData
properties:
data:
$ref: '#/components/schemas/ConversationShare'
messages:
title: Messages
items:
items:
$ref: '#/components/schemas/Request'
type: array
type: array
required:
- messages
- data
type: object
DashboardGraphData:
title: DashboardGraphData
properties:
color:
title: Color
type: string
cumulative:
title: Cumulative
type: boolean
data:
title: Data
items:
$ref: '#/components/schemas/StatsPopulatedGraphResult'
type: array
id:
title: Id
type: string
interval:
title: Interval
type: string
label:
title: Label
type: string
large:
title: Large
default: false
type: boolean
max:
title: Max
type: number
name:
title: Name
type: string
total:
title: Total
type: number
required:
- name
- label
- id
- color
- data
- max
- total
- interval
type: object
FeaturesForSubscriptionDescriptions:
title: FeaturesForSubscriptionDescriptions
description: >-
See FeaturesForSubscription for more info!
This class is a duplicate so if anything gets renamed on the parent
class, this one will error.
properties:
customer_success:
title: Customer Success
type: string
fine_tuning:
title: Fine Tuning
type: string
flowz:
title: Flowz
type: string
llm_routing:
title: Llm Routing
type: string
max_apps_readable:
title: Max Apps Readable
type: string
max_tokens_readable:
title: Max Tokens Readable
type: string
personalized_llm_routing:
title: Personalized Llm Routing
type: string
prompt_models:
title: Prompt Models
type: string
prompts:
title: Prompts
type: string
support_level_readable:
title: Support Level Readable
type: string
required:
- max_tokens_readable
- max_apps_readable
- support_level_readable
- llm_routing
- flowz
- prompts
- prompt_models
- personalized_llm_routing
- fine_tuning
- customer_success
type: object
FilterLogsRequest:
title: FilterLogsRequest
properties:
app_ids:
title: App Ids
description: >-
The list of API Keys we want to filter for. Leave the list empty to
disable filtering (and return data for all apps) instead.
default: []
items:
format: uuid
type: string
type: array
date_from:
title: Date From
description: The earliest date we are searching for.
format: date-time
type: string
date_to:
title: Date To
description: The latest date we are searching for.
format: date-time
type: string
labels:
title: Labels
description: >-
Only logs (requests) with all of the specified labels will be
returned. Values get compared between their lowercase forms.
additionalProperties:
type: string
type: object
params:
title: Params
description: The sorting parameters for the query
default: []