@kaana.ai/contracts 4.4.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/internal/catalogue.d.ts +180 -0
- package/dist/internal/realtime.d.ts +8 -16
- package/dist/internal/request.d.ts +23 -11
- package/dist/internal/request.js +14 -1
- package/dist/internal/settlement.d.ts +15 -0
- package/dist/internal/settlement.js +17 -0
- package/dist/public/audio.d.ts +22 -21
- package/dist/public/audio.js +38 -25
- package/dist/public/audioFormats.d.ts +19 -0
- package/dist/public/audioFormats.js +12 -0
- package/dist/public/catalogue.d.ts +311 -0
- package/dist/public/catalogue.js +79 -2
- package/dist/public/chatCompletions.d.ts +1 -1
- package/dist/public/messages.d.ts +13 -1
- package/dist/public/messages.js +15 -0
- package/dist/public/realtime.d.ts +63 -54
- package/dist/public/realtime.js +86 -20
- package/dist/public/responses.d.ts +1 -1
- package/dist/public/version.d.ts +28 -2
- package/dist/public/version.js +28 -2
- package/openapi.json +162 -88
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Kaana API",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "5.0.0",
|
|
6
6
|
"description": "Kaana inference API. Generated from @kaana.ai/contracts; the Zod source is the authority. Accounts, applications, oxy_sk_ keys, limits and billing are managed in Oxy Console: https://console.oxy.so"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
@@ -3191,6 +3191,19 @@
|
|
|
3191
3191
|
],
|
|
3192
3192
|
"additionalProperties": false
|
|
3193
3193
|
},
|
|
3194
|
+
"InferenceTranscriptionParameters": {
|
|
3195
|
+
"type": "object",
|
|
3196
|
+
"properties": {
|
|
3197
|
+
"language": {
|
|
3198
|
+
"$ref": "#/components/schemas/LanguageTag"
|
|
3199
|
+
},
|
|
3200
|
+
"prompt": {
|
|
3201
|
+
"type": "string",
|
|
3202
|
+
"maxLength": 4096
|
|
3203
|
+
}
|
|
3204
|
+
},
|
|
3205
|
+
"additionalProperties": false
|
|
3206
|
+
},
|
|
3194
3207
|
"LanguageTag": {
|
|
3195
3208
|
"type": "string",
|
|
3196
3209
|
"maxLength": 35,
|
|
@@ -3358,6 +3371,12 @@
|
|
|
3358
3371
|
"$ref": "#/components/schemas/LanguageTag"
|
|
3359
3372
|
}
|
|
3360
3373
|
},
|
|
3374
|
+
"detectsLanguage": {
|
|
3375
|
+
"type": "boolean"
|
|
3376
|
+
},
|
|
3377
|
+
"transcriptionPrompt": {
|
|
3378
|
+
"type": "boolean"
|
|
3379
|
+
},
|
|
3361
3380
|
"audioFormats": {
|
|
3362
3381
|
"type": "object",
|
|
3363
3382
|
"properties": {
|
|
@@ -3684,6 +3703,9 @@
|
|
|
3684
3703
|
"output"
|
|
3685
3704
|
],
|
|
3686
3705
|
"additionalProperties": false
|
|
3706
|
+
},
|
|
3707
|
+
"parameters": {
|
|
3708
|
+
"$ref": "#/components/schemas/RealtimeParameters"
|
|
3687
3709
|
}
|
|
3688
3710
|
},
|
|
3689
3711
|
"required": [
|
|
@@ -3872,6 +3894,22 @@
|
|
|
3872
3894
|
],
|
|
3873
3895
|
"additionalProperties": false
|
|
3874
3896
|
},
|
|
3897
|
+
"NumberRange": {
|
|
3898
|
+
"type": "object",
|
|
3899
|
+
"properties": {
|
|
3900
|
+
"min": {
|
|
3901
|
+
"type": "number"
|
|
3902
|
+
},
|
|
3903
|
+
"max": {
|
|
3904
|
+
"type": "number"
|
|
3905
|
+
}
|
|
3906
|
+
},
|
|
3907
|
+
"required": [
|
|
3908
|
+
"min",
|
|
3909
|
+
"max"
|
|
3910
|
+
],
|
|
3911
|
+
"additionalProperties": false
|
|
3912
|
+
},
|
|
3875
3913
|
"OxyApplicationId": {
|
|
3876
3914
|
"type": "string",
|
|
3877
3915
|
"minLength": 1,
|
|
@@ -4760,11 +4798,6 @@
|
|
|
4760
4798
|
"type": "integer",
|
|
4761
4799
|
"exclusiveMinimum": 0,
|
|
4762
4800
|
"maximum": 10000
|
|
4763
|
-
},
|
|
4764
|
-
"maxTextItems": {
|
|
4765
|
-
"type": "integer",
|
|
4766
|
-
"minimum": 0,
|
|
4767
|
-
"maximum": 10000
|
|
4768
4801
|
}
|
|
4769
4802
|
},
|
|
4770
4803
|
"additionalProperties": false
|
|
@@ -4875,6 +4908,52 @@
|
|
|
4875
4908
|
"audio"
|
|
4876
4909
|
]
|
|
4877
4910
|
},
|
|
4911
|
+
"RealtimeParameters": {
|
|
4912
|
+
"type": "object",
|
|
4913
|
+
"properties": {
|
|
4914
|
+
"turnDetection": {
|
|
4915
|
+
"minItems": 1,
|
|
4916
|
+
"type": "array",
|
|
4917
|
+
"items": {
|
|
4918
|
+
"$ref": "#/components/schemas/RealtimeTurnDetectionParameters"
|
|
4919
|
+
}
|
|
4920
|
+
},
|
|
4921
|
+
"outputModalities": {
|
|
4922
|
+
"minItems": 1,
|
|
4923
|
+
"type": "array",
|
|
4924
|
+
"items": {
|
|
4925
|
+
"minItems": 1,
|
|
4926
|
+
"maxItems": 2,
|
|
4927
|
+
"type": "array",
|
|
4928
|
+
"items": {
|
|
4929
|
+
"$ref": "#/components/schemas/RealtimeOutputModality"
|
|
4930
|
+
}
|
|
4931
|
+
}
|
|
4932
|
+
},
|
|
4933
|
+
"toolChoice": {
|
|
4934
|
+
"minItems": 1,
|
|
4935
|
+
"type": "array",
|
|
4936
|
+
"items": {
|
|
4937
|
+
"$ref": "#/components/schemas/RealtimeToolChoiceKind"
|
|
4938
|
+
}
|
|
4939
|
+
},
|
|
4940
|
+
"maxOutputTokens": {
|
|
4941
|
+
"type": "integer",
|
|
4942
|
+
"exclusiveMinimum": 0,
|
|
4943
|
+
"maximum": 9007199254740991
|
|
4944
|
+
},
|
|
4945
|
+
"inputTranscriptionPrompt": {
|
|
4946
|
+
"type": "boolean"
|
|
4947
|
+
}
|
|
4948
|
+
},
|
|
4949
|
+
"required": [
|
|
4950
|
+
"turnDetection",
|
|
4951
|
+
"outputModalities",
|
|
4952
|
+
"toolChoice",
|
|
4953
|
+
"inputTranscriptionPrompt"
|
|
4954
|
+
],
|
|
4955
|
+
"additionalProperties": false
|
|
4956
|
+
},
|
|
4878
4957
|
"RealtimePublicErrorEvent": {
|
|
4879
4958
|
"type": "object",
|
|
4880
4959
|
"properties": {
|
|
@@ -5352,17 +5431,12 @@
|
|
|
5352
5431
|
"maxItems": 128,
|
|
5353
5432
|
"type": "array",
|
|
5354
5433
|
"items": {
|
|
5355
|
-
"$ref": "#/components/schemas/
|
|
5434
|
+
"$ref": "#/components/schemas/RealtimeToolDefinition"
|
|
5356
5435
|
}
|
|
5357
5436
|
},
|
|
5358
5437
|
"toolChoice": {
|
|
5359
5438
|
"$ref": "#/components/schemas/ToolChoice"
|
|
5360
5439
|
},
|
|
5361
|
-
"temperature": {
|
|
5362
|
-
"type": "number",
|
|
5363
|
-
"minimum": 0,
|
|
5364
|
-
"maximum": 2
|
|
5365
|
-
},
|
|
5366
5440
|
"maxOutputTokens": {
|
|
5367
5441
|
"type": "integer",
|
|
5368
5442
|
"exclusiveMinimum": 0,
|
|
@@ -5400,17 +5474,12 @@
|
|
|
5400
5474
|
"maxItems": 128,
|
|
5401
5475
|
"type": "array",
|
|
5402
5476
|
"items": {
|
|
5403
|
-
"$ref": "#/components/schemas/
|
|
5477
|
+
"$ref": "#/components/schemas/RealtimeToolDefinition"
|
|
5404
5478
|
}
|
|
5405
5479
|
},
|
|
5406
5480
|
"toolChoice": {
|
|
5407
5481
|
"$ref": "#/components/schemas/ToolChoice"
|
|
5408
5482
|
},
|
|
5409
|
-
"temperature": {
|
|
5410
|
-
"type": "number",
|
|
5411
|
-
"minimum": 0,
|
|
5412
|
-
"maximum": 2
|
|
5413
|
-
},
|
|
5414
5483
|
"maxOutputTokens": {
|
|
5415
5484
|
"type": "integer",
|
|
5416
5485
|
"exclusiveMinimum": 0,
|
|
@@ -5820,6 +5889,46 @@
|
|
|
5820
5889
|
"complete"
|
|
5821
5890
|
]
|
|
5822
5891
|
},
|
|
5892
|
+
"RealtimeToolChoiceKind": {
|
|
5893
|
+
"type": "string",
|
|
5894
|
+
"enum": [
|
|
5895
|
+
"auto",
|
|
5896
|
+
"none",
|
|
5897
|
+
"required",
|
|
5898
|
+
"function"
|
|
5899
|
+
]
|
|
5900
|
+
},
|
|
5901
|
+
"RealtimeToolDefinition": {
|
|
5902
|
+
"type": "object",
|
|
5903
|
+
"properties": {
|
|
5904
|
+
"type": {
|
|
5905
|
+
"type": "string",
|
|
5906
|
+
"const": "function"
|
|
5907
|
+
},
|
|
5908
|
+
"name": {
|
|
5909
|
+
"type": "string",
|
|
5910
|
+
"minLength": 1,
|
|
5911
|
+
"maxLength": 128
|
|
5912
|
+
},
|
|
5913
|
+
"description": {
|
|
5914
|
+
"type": "string",
|
|
5915
|
+
"maxLength": 2000
|
|
5916
|
+
},
|
|
5917
|
+
"parameters": {
|
|
5918
|
+
"type": "object",
|
|
5919
|
+
"propertyNames": {
|
|
5920
|
+
"type": "string"
|
|
5921
|
+
},
|
|
5922
|
+
"additionalProperties": {}
|
|
5923
|
+
}
|
|
5924
|
+
},
|
|
5925
|
+
"required": [
|
|
5926
|
+
"type",
|
|
5927
|
+
"name",
|
|
5928
|
+
"parameters"
|
|
5929
|
+
],
|
|
5930
|
+
"additionalProperties": false
|
|
5931
|
+
},
|
|
5823
5932
|
"RealtimeTranscriptDeltaEvent": {
|
|
5824
5933
|
"type": "object",
|
|
5825
5934
|
"properties": {
|
|
@@ -5943,6 +6052,33 @@
|
|
|
5943
6052
|
],
|
|
5944
6053
|
"additionalProperties": false
|
|
5945
6054
|
},
|
|
6055
|
+
"RealtimeTurnDetectionParameters": {
|
|
6056
|
+
"type": "object",
|
|
6057
|
+
"properties": {
|
|
6058
|
+
"type": {
|
|
6059
|
+
"$ref": "#/components/schemas/RealtimeTurnDetectionType"
|
|
6060
|
+
},
|
|
6061
|
+
"fixedResponses": {
|
|
6062
|
+
"type": "boolean"
|
|
6063
|
+
},
|
|
6064
|
+
"threshold": {
|
|
6065
|
+
"$ref": "#/components/schemas/NumberRange"
|
|
6066
|
+
},
|
|
6067
|
+
"meteredUnits": {
|
|
6068
|
+
"minItems": 1,
|
|
6069
|
+
"type": "array",
|
|
6070
|
+
"items": {
|
|
6071
|
+
"$ref": "#/components/schemas/UsageUnit"
|
|
6072
|
+
}
|
|
6073
|
+
}
|
|
6074
|
+
},
|
|
6075
|
+
"required": [
|
|
6076
|
+
"type",
|
|
6077
|
+
"fixedResponses",
|
|
6078
|
+
"meteredUnits"
|
|
6079
|
+
],
|
|
6080
|
+
"additionalProperties": false
|
|
6081
|
+
},
|
|
5946
6082
|
"RealtimeTurnDetection": {
|
|
5947
6083
|
"oneOf": [
|
|
5948
6084
|
{
|
|
@@ -6027,6 +6163,14 @@
|
|
|
6027
6163
|
}
|
|
6028
6164
|
]
|
|
6029
6165
|
},
|
|
6166
|
+
"RealtimeTurnDetectionType": {
|
|
6167
|
+
"type": "string",
|
|
6168
|
+
"enum": [
|
|
6169
|
+
"none",
|
|
6170
|
+
"server_vad",
|
|
6171
|
+
"semantic_vad"
|
|
6172
|
+
]
|
|
6173
|
+
},
|
|
6030
6174
|
"ReasoningEffort": {
|
|
6031
6175
|
"type": "string",
|
|
6032
6176
|
"enum": [
|
|
@@ -6682,14 +6826,6 @@
|
|
|
6682
6826
|
"type": "string",
|
|
6683
6827
|
"maxLength": 4096
|
|
6684
6828
|
},
|
|
6685
|
-
"timestamps": {
|
|
6686
|
-
"type": "string",
|
|
6687
|
-
"enum": [
|
|
6688
|
-
"none",
|
|
6689
|
-
"segment",
|
|
6690
|
-
"word"
|
|
6691
|
-
]
|
|
6692
|
-
},
|
|
6693
6829
|
"audio": {
|
|
6694
6830
|
"type": "object",
|
|
6695
6831
|
"properties": {
|
|
@@ -6728,14 +6864,6 @@
|
|
|
6728
6864
|
"prompt": {
|
|
6729
6865
|
"type": "string",
|
|
6730
6866
|
"maxLength": 4096
|
|
6731
|
-
},
|
|
6732
|
-
"timestamps": {
|
|
6733
|
-
"type": "string",
|
|
6734
|
-
"enum": [
|
|
6735
|
-
"none",
|
|
6736
|
-
"segment",
|
|
6737
|
-
"word"
|
|
6738
|
-
]
|
|
6739
6867
|
}
|
|
6740
6868
|
},
|
|
6741
6869
|
"required": [
|
|
@@ -6767,60 +6895,6 @@
|
|
|
6767
6895
|
"minimum": 0,
|
|
6768
6896
|
"maximum": 9007199254740991
|
|
6769
6897
|
},
|
|
6770
|
-
"segments": {
|
|
6771
|
-
"type": "array",
|
|
6772
|
-
"items": {
|
|
6773
|
-
"type": "object",
|
|
6774
|
-
"properties": {
|
|
6775
|
-
"startMs": {
|
|
6776
|
-
"type": "integer",
|
|
6777
|
-
"minimum": 0,
|
|
6778
|
-
"maximum": 9007199254740991
|
|
6779
|
-
},
|
|
6780
|
-
"endMs": {
|
|
6781
|
-
"type": "integer",
|
|
6782
|
-
"minimum": 0,
|
|
6783
|
-
"maximum": 9007199254740991
|
|
6784
|
-
},
|
|
6785
|
-
"text": {
|
|
6786
|
-
"type": "string"
|
|
6787
|
-
}
|
|
6788
|
-
},
|
|
6789
|
-
"required": [
|
|
6790
|
-
"startMs",
|
|
6791
|
-
"endMs",
|
|
6792
|
-
"text"
|
|
6793
|
-
],
|
|
6794
|
-
"additionalProperties": false
|
|
6795
|
-
}
|
|
6796
|
-
},
|
|
6797
|
-
"words": {
|
|
6798
|
-
"type": "array",
|
|
6799
|
-
"items": {
|
|
6800
|
-
"type": "object",
|
|
6801
|
-
"properties": {
|
|
6802
|
-
"startMs": {
|
|
6803
|
-
"type": "integer",
|
|
6804
|
-
"minimum": 0,
|
|
6805
|
-
"maximum": 9007199254740991
|
|
6806
|
-
},
|
|
6807
|
-
"endMs": {
|
|
6808
|
-
"type": "integer",
|
|
6809
|
-
"minimum": 0,
|
|
6810
|
-
"maximum": 9007199254740991
|
|
6811
|
-
},
|
|
6812
|
-
"word": {
|
|
6813
|
-
"type": "string"
|
|
6814
|
-
}
|
|
6815
|
-
},
|
|
6816
|
-
"required": [
|
|
6817
|
-
"startMs",
|
|
6818
|
-
"endMs",
|
|
6819
|
-
"word"
|
|
6820
|
-
],
|
|
6821
|
-
"additionalProperties": false
|
|
6822
|
-
}
|
|
6823
|
-
},
|
|
6824
6898
|
"usage": {
|
|
6825
6899
|
"$ref": "#/components/schemas/Usage"
|
|
6826
6900
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaana.ai/contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Kaana inference contract: the Zod schemas of the public API at https://kaana.ai/v1 and, under /internal, of the Oxy-Kaana grant, settlement and signed lane.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|