langwatch 0.4.1 → 0.5.1

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.
Files changed (108) hide show
  1. package/dist/{add-RGWB3264.js → add-4WXEWG5H.js} +63 -34
  2. package/dist/add-4WXEWG5H.js.map +1 -0
  3. package/dist/{add-WLUMK5VQ.mjs → add-D2WVVKIP.mjs} +48 -19
  4. package/dist/add-D2WVVKIP.mjs.map +1 -0
  5. package/dist/{chunk-K64Y6YUG.js → chunk-7OZKH5K2.js} +59 -19
  6. package/dist/chunk-7OZKH5K2.js.map +1 -0
  7. package/dist/{chunk-HA3LI5IK.js → chunk-AZHZ4NB4.js} +1 -1
  8. package/dist/{chunk-HA3LI5IK.js.map → chunk-AZHZ4NB4.js.map} +1 -1
  9. package/dist/{chunk-4NRLVT2U.mjs → chunk-BTBSMJTY.mjs} +1 -1
  10. package/dist/chunk-BTBSMJTY.mjs.map +1 -0
  11. package/dist/{chunk-D2CSG4SJ.js → chunk-CAZONSXV.js} +5 -5
  12. package/dist/{chunk-D2CSG4SJ.js.map → chunk-CAZONSXV.js.map} +1 -1
  13. package/dist/{chunk-HUI45ULC.mjs → chunk-CKVDNVFL.mjs} +3 -3
  14. package/dist/{chunk-ECUXLXFT.mjs → chunk-DLJO7AK5.mjs} +53 -13
  15. package/dist/chunk-DLJO7AK5.mjs.map +1 -0
  16. package/dist/{chunk-AZELEDOV.js → chunk-DSIQSULK.js} +15 -18
  17. package/dist/chunk-DSIQSULK.js.map +1 -0
  18. package/dist/{chunk-M4VUHTT2.js → chunk-ECOC36EA.js} +11 -11
  19. package/dist/chunk-ECOC36EA.js.map +1 -0
  20. package/dist/{chunk-IZ2U3ABC.mjs → chunk-H5PON53W.mjs} +67 -127
  21. package/dist/chunk-H5PON53W.mjs.map +1 -0
  22. package/dist/{chunk-4TF2O2TH.js → chunk-P4SQTYGN.js} +14 -14
  23. package/dist/{chunk-4TF2O2TH.js.map → chunk-P4SQTYGN.js.map} +1 -1
  24. package/dist/{chunk-DEVJ7BPE.js → chunk-QCYYSMCU.js} +2 -2
  25. package/dist/chunk-QCYYSMCU.js.map +1 -0
  26. package/dist/{chunk-EJWJXTPU.mjs → chunk-QZGTM76F.mjs} +8 -8
  27. package/dist/chunk-QZGTM76F.mjs.map +1 -0
  28. package/dist/{chunk-SGNJDRCT.js → chunk-R6FBJN7K.js} +22 -7
  29. package/dist/chunk-R6FBJN7K.js.map +1 -0
  30. package/dist/{chunk-5N5BUR2Z.js → chunk-SVXNUWZI.js} +68 -128
  31. package/dist/chunk-SVXNUWZI.js.map +1 -0
  32. package/dist/{chunk-SYMZPWZE.mjs → chunk-V5M3HUBV.mjs} +22 -7
  33. package/dist/chunk-V5M3HUBV.mjs.map +1 -0
  34. package/dist/{chunk-4ILMGMAP.mjs → chunk-YEGQXDTE.mjs} +5 -8
  35. package/dist/{chunk-4ILMGMAP.mjs.map → chunk-YEGQXDTE.mjs.map} +1 -1
  36. package/dist/{chunk-FQSWUK5N.mjs → chunk-YKFTFYKK.mjs} +2 -2
  37. package/dist/chunk-YKFTFYKK.mjs.map +1 -0
  38. package/dist/{chunk-ZJZ3MIWE.mjs → chunk-ZIULPOMQ.mjs} +2 -2
  39. package/dist/cli/index.js +9 -9
  40. package/dist/cli/index.mjs +8 -8
  41. package/dist/{create-7K2CC4KQ.js → create-4LG4N2A4.js} +27 -16
  42. package/dist/create-4LG4N2A4.js.map +1 -0
  43. package/dist/{create-MK7NEGCM.mjs → create-OQEMO4MU.mjs} +22 -11
  44. package/dist/create-OQEMO4MU.mjs.map +1 -0
  45. package/dist/{implementation-CzemP9jY.d.ts → implementation-BIlL6-SW.d.ts} +1 -1
  46. package/dist/{implementation-C4lvooSg.d.mts → implementation-fAgqv8OM.d.mts} +1 -1
  47. package/dist/index.d.mts +2 -2
  48. package/dist/index.d.ts +2 -2
  49. package/dist/index.js +7 -7
  50. package/dist/index.mjs +6 -6
  51. package/dist/init-EKNL2SQE.js +16 -0
  52. package/dist/{init-GDKJICSS.js.map → init-EKNL2SQE.js.map} +1 -1
  53. package/dist/{init-RINSTP4L.mjs → init-MQXXHCNT.mjs} +5 -5
  54. package/dist/{list-DBUK47MA.js → list-GIAXAAH5.js} +10 -10
  55. package/dist/list-GIAXAAH5.js.map +1 -0
  56. package/dist/{list-ZOMRKOBV.mjs → list-PFWV7IU6.mjs} +7 -7
  57. package/dist/list-PFWV7IU6.mjs.map +1 -0
  58. package/dist/{login-A7LEPNBR.js → login-3STX2FAO.js} +3 -3
  59. package/dist/{login-A7LEPNBR.js.map → login-3STX2FAO.js.map} +1 -1
  60. package/dist/{login-ULPHWIAX.mjs → login-BYLXS23I.mjs} +2 -2
  61. package/dist/observability-sdk/index.d.mts +3 -3
  62. package/dist/observability-sdk/index.d.ts +3 -3
  63. package/dist/observability-sdk/index.js +4 -4
  64. package/dist/observability-sdk/index.mjs +3 -3
  65. package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
  66. package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
  67. package/dist/observability-sdk/instrumentation/langchain/index.js +3 -3
  68. package/dist/observability-sdk/instrumentation/langchain/index.mjs +1 -1
  69. package/dist/observability-sdk/setup/node/index.d.mts +1 -1
  70. package/dist/observability-sdk/setup/node/index.d.ts +1 -1
  71. package/dist/observability-sdk/setup/node/index.js +10 -10
  72. package/dist/observability-sdk/setup/node/index.mjs +2 -2
  73. package/dist/{remove-RAJBGHQQ.mjs → remove-FTF3EBYV.mjs} +8 -8
  74. package/dist/{remove-ODTJLFWR.js → remove-U3PILQDV.js} +16 -16
  75. package/dist/{remove-ODTJLFWR.js.map → remove-U3PILQDV.js.map} +1 -1
  76. package/dist/{sync-2IXPWN64.mjs → sync-FOW7DHAH.mjs} +27 -19
  77. package/dist/sync-FOW7DHAH.mjs.map +1 -0
  78. package/dist/{sync-PBOL5ODF.js → sync-T3T22GVZ.js} +45 -37
  79. package/dist/sync-T3T22GVZ.js.map +1 -0
  80. package/dist/{types-C9k5gGhU.d.ts → types-DyUmlaDx.d.ts} +973 -533
  81. package/dist/{types-1q5wIYP5.d.mts → types-jrEEZt9d.d.mts} +973 -533
  82. package/package.json +16 -14
  83. package/dist/add-RGWB3264.js.map +0 -1
  84. package/dist/add-WLUMK5VQ.mjs.map +0 -1
  85. package/dist/chunk-4NRLVT2U.mjs.map +0 -1
  86. package/dist/chunk-5N5BUR2Z.js.map +0 -1
  87. package/dist/chunk-AZELEDOV.js.map +0 -1
  88. package/dist/chunk-DEVJ7BPE.js.map +0 -1
  89. package/dist/chunk-ECUXLXFT.mjs.map +0 -1
  90. package/dist/chunk-EJWJXTPU.mjs.map +0 -1
  91. package/dist/chunk-FQSWUK5N.mjs.map +0 -1
  92. package/dist/chunk-IZ2U3ABC.mjs.map +0 -1
  93. package/dist/chunk-K64Y6YUG.js.map +0 -1
  94. package/dist/chunk-M4VUHTT2.js.map +0 -1
  95. package/dist/chunk-SGNJDRCT.js.map +0 -1
  96. package/dist/chunk-SYMZPWZE.mjs.map +0 -1
  97. package/dist/create-7K2CC4KQ.js.map +0 -1
  98. package/dist/create-MK7NEGCM.mjs.map +0 -1
  99. package/dist/init-GDKJICSS.js +0 -16
  100. package/dist/list-DBUK47MA.js.map +0 -1
  101. package/dist/list-ZOMRKOBV.mjs.map +0 -1
  102. package/dist/sync-2IXPWN64.mjs.map +0 -1
  103. package/dist/sync-PBOL5ODF.js.map +0 -1
  104. /package/dist/{chunk-HUI45ULC.mjs.map → chunk-CKVDNVFL.mjs.map} +0 -0
  105. /package/dist/{chunk-ZJZ3MIWE.mjs.map → chunk-ZIULPOMQ.mjs.map} +0 -0
  106. /package/dist/{init-RINSTP4L.mjs.map → init-MQXXHCNT.mjs.map} +0 -0
  107. /package/dist/{login-ULPHWIAX.mjs.map → login-BYLXS23I.mjs.map} +0 -0
  108. /package/dist/{remove-RAJBGHQQ.mjs.map → remove-FTF3EBYV.mjs.map} +0 -0
@@ -702,72 +702,70 @@ interface paths {
702
702
  patch?: never;
703
703
  trace?: never;
704
704
  };
705
- "/api/dataset/{slug}/entries": {
705
+ "/api/prompts/{id}": {
706
706
  parameters: {
707
707
  query?: never;
708
708
  header?: never;
709
709
  path?: never;
710
710
  cookie?: never;
711
711
  };
712
- get?: never;
713
- put?: never;
714
- /** @description Add entries to a dataset */
715
- post: operations["postApiDatasetBySlugEntries"];
716
- delete?: never;
712
+ /** @description Get a specific prompt */
713
+ get: operations["getApiPromptsById"];
714
+ /** @description Update a prompt */
715
+ put: operations["putApiPromptsById"];
716
+ post?: never;
717
+ /** @description Delete a prompt */
718
+ delete: operations["deleteApiPromptsById"];
717
719
  options?: never;
718
720
  head?: never;
719
721
  patch?: never;
720
722
  trace?: never;
721
723
  };
722
- "/api/prompts": {
724
+ "/api/prompts/{id}/versions": {
723
725
  parameters: {
724
726
  query?: never;
725
727
  header?: never;
726
728
  path?: never;
727
729
  cookie?: never;
728
730
  };
729
- /** @description Get all prompts for a project */
730
- get: operations["getApiPrompts"];
731
+ /** @description Get all versions for a prompt. Does not include base prompt data, only versioned data. */
732
+ get: operations["getApiPromptsByIdVersions"];
731
733
  put?: never;
732
- /** @description Create a new prompt with default initial version */
733
- post: operations["postApiPrompts"];
734
+ post?: never;
734
735
  delete?: never;
735
736
  options?: never;
736
737
  head?: never;
737
738
  patch?: never;
738
739
  trace?: never;
739
740
  };
740
- "/api/prompts/{id}": {
741
+ "/api/prompts/{id}/sync": {
741
742
  parameters: {
742
743
  query?: never;
743
744
  header?: never;
744
745
  path?: never;
745
746
  cookie?: never;
746
747
  };
747
- /** @description Get a specific prompt */
748
- get: operations["getApiPromptsById"];
749
- /** @description Update a prompt */
750
- put: operations["putApiPromptsById"];
751
- post?: never;
752
- /** @description Delete a prompt */
753
- delete: operations["deleteApiPromptsById"];
748
+ get?: never;
749
+ put?: never;
750
+ /** @description Sync/upsert a prompt with local content */
751
+ post: operations["postApiPromptsByIdSync"];
752
+ delete?: never;
754
753
  options?: never;
755
754
  head?: never;
756
755
  patch?: never;
757
756
  trace?: never;
758
757
  };
759
- "/api/prompts/{id}/versions": {
758
+ "/api/dataset/{slug}/entries": {
760
759
  parameters: {
761
760
  query?: never;
762
761
  header?: never;
763
762
  path?: never;
764
763
  cookie?: never;
765
764
  };
766
- /** @description Get all versions for a prompt */
767
- get: operations["getApiPromptsByIdVersions"];
765
+ get?: never;
768
766
  put?: never;
769
- /** @description Create a new version for a prompt */
770
- post: operations["postApiPromptsByIdVersions"];
767
+ /** @description Add entries to a dataset */
768
+ post: operations["postApiDatasetBySlugEntries"];
771
769
  delete?: never;
772
770
  options?: never;
773
771
  head?: never;
@@ -791,6 +789,24 @@ interface paths {
791
789
  patch?: never;
792
790
  trace?: never;
793
791
  };
792
+ "/api/prompts": {
793
+ parameters: {
794
+ query?: never;
795
+ header?: never;
796
+ path?: never;
797
+ cookie?: never;
798
+ };
799
+ /** @description Get all prompts for a project */
800
+ get: operations["getApiPrompts"];
801
+ put?: never;
802
+ /** @description Create a new prompt with default initial version */
803
+ post: operations["postApiPrompts"];
804
+ delete?: never;
805
+ options?: never;
806
+ head?: never;
807
+ patch?: never;
808
+ trace?: never;
809
+ };
794
810
  "/api/scenario-events": {
795
811
  parameters: {
796
812
  query?: never;
@@ -809,17 +825,18 @@ interface paths {
809
825
  patch?: never;
810
826
  trace?: never;
811
827
  };
812
- "/api/prompts/{id}/sync": {
828
+ "/": {
813
829
  parameters: {
814
830
  query?: never;
815
831
  header?: never;
816
832
  path?: never;
817
833
  cookie?: never;
818
834
  };
819
- get?: never;
835
+ /** @description Get all prompts for a project */
836
+ get: operations["getIndex"];
820
837
  put?: never;
821
- /** @description Sync/upsert a prompt with local content */
822
- post: operations["postApiPromptsByIdSync"];
838
+ /** @description Create a new prompt with default initial version */
839
+ post: operations["postIndex"];
823
840
  delete?: never;
824
841
  options?: never;
825
842
  head?: never;
@@ -950,27 +967,16 @@ interface components {
950
967
  pathItems: never;
951
968
  }
952
969
  interface operations {
953
- postApiDatasetBySlugEntries: {
970
+ getApiPromptsById: {
954
971
  parameters: {
955
- query?: never;
972
+ query?: {
973
+ /** @description Specific version number to retrieve */
974
+ version?: number;
975
+ };
956
976
  header?: never;
957
977
  path: {
958
- slug: string;
959
- };
960
- cookie?: never;
961
- };
962
- requestBody?: {
963
- content: {
964
- "application/json": components["schemas"]["DatasetPostEntries"];
978
+ id: string;
965
979
  };
966
- };
967
- responses: never;
968
- };
969
- getApiPrompts: {
970
- parameters: {
971
- query?: never;
972
- header?: never;
973
- path?: never;
974
980
  cookie?: never;
975
981
  };
976
982
  requestBody?: never;
@@ -983,34 +989,82 @@ interface operations {
983
989
  content: {
984
990
  "application/json": {
985
991
  id: string;
992
+ handle: string | null;
993
+ /** @enum {string} */
994
+ scope: "ORGANIZATION" | "PROJECT";
986
995
  name: string;
987
996
  updatedAt: string;
988
- version: number;
997
+ projectId: string;
998
+ organizationId: string;
989
999
  versionId: string;
990
- versionCreatedAt: string;
991
- model: string;
1000
+ authorId?: string | null;
1001
+ version: number;
1002
+ createdAt: string;
1003
+ commitMessage?: string | null;
992
1004
  prompt: string;
993
- messages: ({
1005
+ /** @default [] */
1006
+ messages: {
994
1007
  /** @enum {string} */
995
1008
  role: "user" | "assistant" | "system";
996
1009
  content: string;
997
- } & {
998
- [key: string]: unknown;
999
- })[];
1000
- response_format: {
1010
+ }[];
1011
+ inputs: {
1012
+ identifier: string;
1013
+ /** @enum {string} */
1014
+ type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict";
1015
+ }[];
1016
+ outputs: {
1017
+ identifier: string;
1018
+ /** @enum {string} */
1019
+ type: "str" | "float" | "bool" | "json_schema";
1020
+ json_schema?: {
1021
+ type: string;
1022
+ } & {
1023
+ [key: string]: unknown;
1024
+ };
1025
+ }[];
1026
+ model: string;
1027
+ temperature?: number;
1028
+ maxTokens?: number;
1029
+ demonstrations?: {
1030
+ id?: string;
1031
+ name?: string;
1032
+ inline?: {
1033
+ records: {
1034
+ [key: string]: string[];
1035
+ };
1036
+ columnTypes: {
1037
+ name: string;
1038
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1039
+ }[];
1040
+ };
1041
+ };
1042
+ promptingTechnique?: {
1043
+ /** @enum {string} */
1044
+ type: "few_shot" | "in_context" | "chain_of_thought";
1045
+ demonstrations?: {
1046
+ id?: string;
1047
+ name?: string;
1048
+ inline?: {
1049
+ records: {
1050
+ [key: string]: string[];
1051
+ };
1052
+ columnTypes: {
1053
+ name: string;
1054
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1055
+ }[];
1056
+ };
1057
+ };
1058
+ };
1059
+ responseFormat?: {
1001
1060
  /** @enum {string} */
1002
1061
  type: "json_schema";
1003
1062
  json_schema: {
1004
1063
  name: string;
1005
1064
  schema: Record<string, never>;
1006
- };
1007
- } | null;
1008
- handle: string | null;
1009
- /** @enum {string} */
1010
- scope: "ORGANIZATION" | "PROJECT";
1011
- projectId: string;
1012
- organizationId: string;
1013
- }[];
1065
+ } | null;
1066
+ };
1067
+ };
1014
1068
  };
1015
1069
  };
1016
1070
  /** @description Bad Request */
@@ -1020,8 +1074,8 @@ interface operations {
1020
1074
  };
1021
1075
  content: {
1022
1076
  "application/json": {
1023
- /** @enum {string} */
1024
- error: "Bad Request";
1077
+ error: string;
1078
+ message?: string;
1025
1079
  };
1026
1080
  };
1027
1081
  };
@@ -1032,8 +1086,20 @@ interface operations {
1032
1086
  };
1033
1087
  content: {
1034
1088
  "application/json": {
1035
- /** @enum {string} */
1036
- error: "Unauthorized";
1089
+ error: string;
1090
+ message?: string;
1091
+ };
1092
+ };
1093
+ };
1094
+ /** @description Prompt not found */
1095
+ 404: {
1096
+ headers: {
1097
+ [name: string]: unknown;
1098
+ };
1099
+ content: {
1100
+ "application/json": {
1101
+ error: string;
1102
+ message?: string;
1037
1103
  };
1038
1104
  };
1039
1105
  };
@@ -1045,28 +1111,29 @@ interface operations {
1045
1111
  content: {
1046
1112
  "application/json": {
1047
1113
  error: string;
1114
+ message?: string;
1048
1115
  };
1049
1116
  };
1050
1117
  };
1051
1118
  };
1052
1119
  };
1053
- postApiPrompts: {
1120
+ putApiPromptsById: {
1054
1121
  parameters: {
1055
1122
  query?: never;
1056
1123
  header?: never;
1057
- path?: never;
1124
+ path: {
1125
+ id: string;
1126
+ };
1058
1127
  cookie?: never;
1059
1128
  };
1060
1129
  requestBody?: {
1061
1130
  content: {
1062
1131
  "application/json": {
1063
- name?: string;
1064
- handle: string;
1065
- /**
1066
- * @default PROJECT
1067
- * @enum {string}
1068
- */
1069
- scope?: "ORGANIZATION" | "PROJECT";
1132
+ handle?: string;
1133
+ model?: string;
1134
+ temperature?: number;
1135
+ maxTokens?: number;
1136
+ commitMessage?: string;
1070
1137
  authorId?: string;
1071
1138
  prompt?: string;
1072
1139
  messages?: {
@@ -1089,6 +1156,10 @@ interface operations {
1089
1156
  [key: string]: unknown;
1090
1157
  };
1091
1158
  }[];
1159
+ /** @enum {string} */
1160
+ schemaVersion?: "1.0";
1161
+ /** @enum {string} */
1162
+ scope?: "ORGANIZATION" | "PROJECT";
1092
1163
  };
1093
1164
  };
1094
1165
  };
@@ -1101,129 +1172,93 @@ interface operations {
1101
1172
  content: {
1102
1173
  "application/json": {
1103
1174
  id: string;
1175
+ handle: string | null;
1176
+ /** @enum {string} */
1177
+ scope: "ORGANIZATION" | "PROJECT";
1104
1178
  name: string;
1105
1179
  updatedAt: string;
1106
- version: number;
1180
+ projectId: string;
1181
+ organizationId: string;
1107
1182
  versionId: string;
1108
- versionCreatedAt: string;
1109
- model: string;
1183
+ authorId?: string | null;
1184
+ version: number;
1185
+ createdAt: string;
1186
+ commitMessage?: string | null;
1110
1187
  prompt: string;
1111
- messages: ({
1188
+ /** @default [] */
1189
+ messages: {
1112
1190
  /** @enum {string} */
1113
1191
  role: "user" | "assistant" | "system";
1114
1192
  content: string;
1115
- } & {
1116
- [key: string]: unknown;
1117
- })[];
1118
- response_format: {
1193
+ }[];
1194
+ inputs: {
1195
+ identifier: string;
1196
+ /** @enum {string} */
1197
+ type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict";
1198
+ }[];
1199
+ outputs: {
1200
+ identifier: string;
1201
+ /** @enum {string} */
1202
+ type: "str" | "float" | "bool" | "json_schema";
1203
+ json_schema?: {
1204
+ type: string;
1205
+ } & {
1206
+ [key: string]: unknown;
1207
+ };
1208
+ }[];
1209
+ model: string;
1210
+ temperature?: number;
1211
+ maxTokens?: number;
1212
+ demonstrations?: {
1213
+ id?: string;
1214
+ name?: string;
1215
+ inline?: {
1216
+ records: {
1217
+ [key: string]: string[];
1218
+ };
1219
+ columnTypes: {
1220
+ name: string;
1221
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1222
+ }[];
1223
+ };
1224
+ };
1225
+ promptingTechnique?: {
1226
+ /** @enum {string} */
1227
+ type: "few_shot" | "in_context" | "chain_of_thought";
1228
+ demonstrations?: {
1229
+ id?: string;
1230
+ name?: string;
1231
+ inline?: {
1232
+ records: {
1233
+ [key: string]: string[];
1234
+ };
1235
+ columnTypes: {
1236
+ name: string;
1237
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1238
+ }[];
1239
+ };
1240
+ };
1241
+ };
1242
+ responseFormat?: {
1119
1243
  /** @enum {string} */
1120
1244
  type: "json_schema";
1121
1245
  json_schema: {
1122
1246
  name: string;
1123
1247
  schema: Record<string, never>;
1124
- };
1125
- } | null;
1126
- handle: string | null;
1127
- /** @enum {string} */
1128
- scope: "ORGANIZATION" | "PROJECT";
1129
- projectId: string;
1130
- organizationId: string;
1248
+ } | null;
1249
+ };
1131
1250
  };
1132
1251
  };
1133
1252
  };
1134
1253
  /** @description Bad Request */
1135
1254
  400: {
1136
- headers: {
1137
- [name: string]: unknown;
1138
- };
1139
- content: {
1140
- "application/json": {
1141
- /** @enum {string} */
1142
- error: "Bad Request";
1143
- };
1144
- };
1145
- };
1146
- /** @description Unauthorized */
1147
- 401: {
1148
- headers: {
1149
- [name: string]: unknown;
1150
- };
1151
- content: {
1152
- "application/json": {
1153
- /** @enum {string} */
1154
- error: "Unauthorized";
1155
- };
1156
- };
1157
- };
1158
- /** @description Internal Server Error */
1159
- 500: {
1160
1255
  headers: {
1161
1256
  [name: string]: unknown;
1162
1257
  };
1163
1258
  content: {
1164
1259
  "application/json": {
1165
1260
  error: string;
1166
- };
1167
- };
1168
- };
1169
- };
1170
- };
1171
- getApiPromptsById: {
1172
- parameters: {
1173
- query?: never;
1174
- header?: never;
1175
- path: {
1176
- id: string;
1177
- };
1178
- cookie?: never;
1179
- };
1180
- requestBody?: never;
1181
- responses: {
1182
- /** @description Success */
1183
- 200: {
1184
- headers: {
1185
- [name: string]: unknown;
1186
- };
1187
- content: {
1188
- "application/json": {
1189
- id: string;
1190
- name: string;
1191
- updatedAt: string;
1192
- version: number;
1193
- versionId: string;
1194
- versionCreatedAt: string;
1195
- model: string;
1196
- prompt: string;
1197
- messages: ({
1198
- /** @enum {string} */
1199
- role: "user" | "assistant" | "system";
1200
- content: string;
1201
- } & {
1202
- [key: string]: unknown;
1203
- })[];
1204
- response_format: {
1205
- /** @enum {string} */
1206
- type: "json_schema";
1207
- json_schema: {
1208
- name: string;
1209
- schema: Record<string, never>;
1210
- };
1211
- } | null;
1212
- handle: string | null;
1213
- /** @enum {string} */
1214
- scope: "ORGANIZATION" | "PROJECT";
1215
- };
1216
- };
1217
- };
1218
- /** @description Bad Request */
1219
- 400: {
1220
- headers: {
1221
- [name: string]: unknown;
1222
- };
1223
- content: {
1224
- "application/json": {
1225
- /** @enum {string} */
1226
- error: "Bad Request";
1261
+ message?: string;
1227
1262
  };
1228
1263
  };
1229
1264
  };
@@ -1234,8 +1269,8 @@ interface operations {
1234
1269
  };
1235
1270
  content: {
1236
1271
  "application/json": {
1237
- /** @enum {string} */
1238
- error: "Unauthorized";
1272
+ error: string;
1273
+ message?: string;
1239
1274
  };
1240
1275
  };
1241
1276
  };
@@ -1247,90 +1282,31 @@ interface operations {
1247
1282
  content: {
1248
1283
  "application/json": {
1249
1284
  error: string;
1285
+ message?: string;
1250
1286
  };
1251
1287
  };
1252
1288
  };
1253
- /** @description Internal Server Error */
1254
- 500: {
1289
+ /** @description Conflict */
1290
+ 409: {
1255
1291
  headers: {
1256
1292
  [name: string]: unknown;
1257
1293
  };
1258
1294
  content: {
1259
1295
  "application/json": {
1260
1296
  error: string;
1297
+ message: string;
1261
1298
  };
1262
1299
  };
1263
1300
  };
1264
- };
1265
- };
1266
- putApiPromptsById: {
1267
- parameters: {
1268
- query?: never;
1269
- header?: never;
1270
- path: {
1271
- id: string;
1272
- };
1273
- cookie?: never;
1274
- };
1275
- requestBody?: {
1276
- content: {
1277
- "application/json": {
1278
- name: string;
1279
- handle?: string;
1280
- /** @enum {string} */
1281
- scope?: "ORGANIZATION" | "PROJECT";
1282
- };
1283
- };
1284
- };
1285
- responses: {
1286
- /** @description Success */
1287
- 200: {
1288
- headers: {
1289
- [name: string]: unknown;
1290
- };
1291
- content: {
1292
- "application/json": {
1293
- id: string;
1294
- name: string;
1295
- updatedAt: string;
1296
- handle: string | null;
1297
- /** @enum {string} */
1298
- scope: "ORGANIZATION" | "PROJECT";
1299
- };
1300
- };
1301
- };
1302
- /** @description Bad Request */
1303
- 400: {
1304
- headers: {
1305
- [name: string]: unknown;
1306
- };
1307
- content: {
1308
- "application/json": {
1309
- /** @enum {string} */
1310
- error: "Bad Request";
1311
- };
1312
- };
1313
- };
1314
- /** @description Unauthorized */
1315
- 401: {
1316
- headers: {
1317
- [name: string]: unknown;
1318
- };
1319
- content: {
1320
- "application/json": {
1321
- /** @enum {string} */
1322
- error: "Unauthorized";
1323
- };
1324
- };
1325
- };
1326
- /** @description Prompt not found */
1327
- 404: {
1301
+ /** @description Invalid input */
1302
+ 422: {
1328
1303
  headers: {
1329
1304
  [name: string]: unknown;
1330
1305
  };
1331
1306
  content: {
1332
1307
  "application/json": {
1333
1308
  error: string;
1309
+ message?: string;
1334
1310
  };
1335
1311
  };
1336
1312
  };
@@ -1342,6 +1318,7 @@ interface operations {
1342
1318
  content: {
1343
1319
  "application/json": {
1344
1320
  error: string;
1321
+ message?: string;
1345
1322
  };
1346
1323
  };
1347
1324
  };
@@ -1376,8 +1353,8 @@ interface operations {
1376
1353
  };
1377
1354
  content: {
1378
1355
  "application/json": {
1379
- /** @enum {string} */
1380
- error: "Bad Request";
1356
+ error: string;
1357
+ message?: string;
1381
1358
  };
1382
1359
  };
1383
1360
  };
@@ -1388,8 +1365,8 @@ interface operations {
1388
1365
  };
1389
1366
  content: {
1390
1367
  "application/json": {
1391
- /** @enum {string} */
1392
- error: "Unauthorized";
1368
+ error: string;
1369
+ message?: string;
1393
1370
  };
1394
1371
  };
1395
1372
  };
@@ -1401,6 +1378,7 @@ interface operations {
1401
1378
  content: {
1402
1379
  "application/json": {
1403
1380
  error: string;
1381
+ message?: string;
1404
1382
  };
1405
1383
  };
1406
1384
  };
@@ -1412,6 +1390,7 @@ interface operations {
1412
1390
  content: {
1413
1391
  "application/json": {
1414
1392
  error: string;
1393
+ message?: string;
1415
1394
  };
1416
1395
  };
1417
1396
  };
@@ -1436,56 +1415,60 @@ interface operations {
1436
1415
  content: {
1437
1416
  "application/json": {
1438
1417
  id: string;
1439
- authorId: string | null;
1418
+ handle: string | null;
1419
+ /** @enum {string} */
1420
+ scope: "ORGANIZATION" | "PROJECT";
1421
+ name: string;
1422
+ updatedAt: string;
1440
1423
  projectId: string;
1441
- configId: string;
1442
- /** @constant */
1443
- schemaVersion: "1.0";
1444
- commitMessage?: string | null;
1424
+ organizationId: string;
1425
+ versionId: string;
1426
+ authorId?: string | null;
1445
1427
  version: number;
1446
1428
  createdAt: string;
1447
- configData: {
1448
- version?: number;
1449
- prompt: string;
1450
- /** @default [] */
1451
- messages: ({
1452
- /** @enum {string} */
1453
- role: "user" | "assistant" | "system";
1454
- content: string;
1429
+ commitMessage?: string | null;
1430
+ prompt: string;
1431
+ /** @default [] */
1432
+ messages: {
1433
+ /** @enum {string} */
1434
+ role: "user" | "assistant" | "system";
1435
+ content: string;
1436
+ }[];
1437
+ inputs: {
1438
+ identifier: string;
1439
+ /** @enum {string} */
1440
+ type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict";
1441
+ }[];
1442
+ outputs: {
1443
+ identifier: string;
1444
+ /** @enum {string} */
1445
+ type: "str" | "float" | "bool" | "json_schema";
1446
+ json_schema?: {
1447
+ type: string;
1455
1448
  } & {
1456
1449
  [key: string]: unknown;
1457
- })[];
1458
- inputs: {
1459
- identifier: string;
1460
- /** @enum {string} */
1461
- type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict";
1462
- }[];
1463
- outputs: {
1464
- identifier: string;
1465
- /** @enum {string} */
1466
- type: "str" | "float" | "bool" | "json_schema";
1467
- json_schema?: {
1468
- type: string;
1469
- } & {
1470
- [key: string]: unknown;
1450
+ };
1451
+ }[];
1452
+ model: string;
1453
+ temperature?: number;
1454
+ maxTokens?: number;
1455
+ demonstrations?: {
1456
+ id?: string;
1457
+ name?: string;
1458
+ inline?: {
1459
+ records: {
1460
+ [key: string]: string[];
1471
1461
  };
1472
- }[];
1473
- model: string;
1474
- temperature?: number;
1475
- max_tokens?: number;
1476
- demonstrations?: {
1477
- columns: {
1478
- id: string;
1462
+ columnTypes: {
1479
1463
  name: string;
1480
- /** @enum {string} */
1481
1464
  type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1482
1465
  }[];
1483
- /** @default [] */
1484
- rows: ({
1485
- id: string;
1486
- } & {
1487
- [key: string]: unknown;
1488
- })[];
1466
+ };
1467
+ };
1468
+ promptingTechnique?: {
1469
+ /** @enum {string} */
1470
+ type: "few_shot" | "in_context" | "chain_of_thought";
1471
+ demonstrations?: {
1489
1472
  id?: string;
1490
1473
  name?: string;
1491
1474
  inline?: {
@@ -1498,17 +1481,16 @@ interface operations {
1498
1481
  }[];
1499
1482
  };
1500
1483
  };
1501
- prompting_technique?: {
1502
- ref?: string;
1503
- };
1504
1484
  };
1505
- author?: {
1506
- name: string;
1507
- } | null;
1508
- handle: string | null;
1509
- /** @enum {string} */
1510
- scope: "ORGANIZATION" | "PROJECT";
1511
- };
1485
+ responseFormat?: {
1486
+ /** @enum {string} */
1487
+ type: "json_schema";
1488
+ json_schema: {
1489
+ name: string;
1490
+ schema: Record<string, never>;
1491
+ } | null;
1492
+ };
1493
+ }[];
1512
1494
  };
1513
1495
  };
1514
1496
  /** @description Bad Request */
@@ -1518,8 +1500,8 @@ interface operations {
1518
1500
  };
1519
1501
  content: {
1520
1502
  "application/json": {
1521
- /** @enum {string} */
1522
- error: "Bad Request";
1503
+ error: string;
1504
+ message?: string;
1523
1505
  };
1524
1506
  };
1525
1507
  };
@@ -1530,8 +1512,8 @@ interface operations {
1530
1512
  };
1531
1513
  content: {
1532
1514
  "application/json": {
1533
- /** @enum {string} */
1534
- error: "Unauthorized";
1515
+ error: string;
1516
+ message?: string;
1535
1517
  };
1536
1518
  };
1537
1519
  };
@@ -1543,6 +1525,7 @@ interface operations {
1543
1525
  content: {
1544
1526
  "application/json": {
1545
1527
  error: string;
1528
+ message?: string;
1546
1529
  };
1547
1530
  };
1548
1531
  };
@@ -1554,12 +1537,13 @@ interface operations {
1554
1537
  content: {
1555
1538
  "application/json": {
1556
1539
  error: string;
1540
+ message?: string;
1557
1541
  };
1558
1542
  };
1559
1543
  };
1560
1544
  };
1561
1545
  };
1562
- postApiPromptsByIdVersions: {
1546
+ postApiPromptsByIdSync: {
1563
1547
  parameters: {
1564
1548
  query?: never;
1565
1549
  header?: never;
@@ -1571,26 +1555,14 @@ interface operations {
1571
1555
  requestBody?: {
1572
1556
  content: {
1573
1557
  "application/json": {
1574
- id?: string;
1575
- authorId?: string | null;
1576
- projectId: string;
1577
- configId: string;
1578
- /** @constant */
1579
- schemaVersion: "1.0";
1580
- commitMessage: string;
1581
- version: number;
1582
- createdAt?: string;
1583
1558
  configData: {
1584
- version?: number;
1585
1559
  prompt: string;
1586
1560
  /** @default [] */
1587
- messages?: ({
1561
+ messages?: {
1588
1562
  /** @enum {string} */
1589
1563
  role: "user" | "assistant" | "system";
1590
1564
  content: string;
1591
- } & {
1592
- [key: string]: unknown;
1593
- })[];
1565
+ }[];
1594
1566
  inputs: {
1595
1567
  identifier: string;
1596
1568
  /** @enum {string} */
@@ -1610,18 +1582,6 @@ interface operations {
1610
1582
  temperature?: number;
1611
1583
  max_tokens?: number;
1612
1584
  demonstrations?: {
1613
- columns: {
1614
- id: string;
1615
- name: string;
1616
- /** @enum {string} */
1617
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1618
- }[];
1619
- /** @default [] */
1620
- rows?: ({
1621
- id: string;
1622
- } & {
1623
- [key: string]: unknown;
1624
- })[];
1625
1585
  id?: string;
1626
1586
  name?: string;
1627
1587
  inline?: {
@@ -1635,43 +1595,67 @@ interface operations {
1635
1595
  };
1636
1596
  };
1637
1597
  prompting_technique?: {
1638
- ref?: string;
1639
- };
1640
- };
1641
- author?: {
1642
- name: string;
1643
- } | null;
1598
+ /** @enum {string} */
1599
+ type: "few_shot" | "in_context" | "chain_of_thought";
1600
+ demonstrations?: {
1601
+ id?: string;
1602
+ name?: string;
1603
+ inline?: {
1604
+ records: {
1605
+ [key: string]: string[];
1606
+ };
1607
+ columnTypes: {
1608
+ name: string;
1609
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1610
+ }[];
1611
+ };
1612
+ };
1613
+ };
1614
+ response_format?: {
1615
+ /** @enum {string} */
1616
+ type: "json_schema";
1617
+ json_schema: {
1618
+ name: string;
1619
+ schema: Record<string, never>;
1620
+ } | null;
1621
+ };
1622
+ };
1623
+ localVersion?: number;
1624
+ commitMessage?: string;
1644
1625
  };
1645
1626
  };
1646
1627
  };
1647
1628
  responses: {
1648
- /** @description Success */
1629
+ /** @description Sync result */
1649
1630
  200: {
1650
1631
  headers: {
1651
1632
  [name: string]: unknown;
1652
1633
  };
1653
1634
  content: {
1654
1635
  "application/json": {
1655
- id: string;
1656
- authorId: string | null;
1657
- projectId: string;
1658
- configId: string;
1659
- /** @constant */
1660
- schemaVersion: "1.0";
1661
- commitMessage?: string | null;
1662
- version: number;
1663
- createdAt: string;
1664
- configData: {
1665
- version?: number;
1636
+ /** @enum {string} */
1637
+ action: "created" | "updated" | "conflict" | "up_to_date";
1638
+ prompt?: {
1639
+ id: string;
1640
+ handle: string | null;
1641
+ /** @enum {string} */
1642
+ scope: "ORGANIZATION" | "PROJECT";
1643
+ name: string;
1644
+ updatedAt: string;
1645
+ projectId: string;
1646
+ organizationId: string;
1647
+ versionId: string;
1648
+ authorId?: string | null;
1649
+ version: number;
1650
+ createdAt: string;
1651
+ commitMessage?: string | null;
1666
1652
  prompt: string;
1667
1653
  /** @default [] */
1668
- messages: ({
1654
+ messages: {
1669
1655
  /** @enum {string} */
1670
1656
  role: "user" | "assistant" | "system";
1671
1657
  content: string;
1672
- } & {
1673
- [key: string]: unknown;
1674
- })[];
1658
+ }[];
1675
1659
  inputs: {
1676
1660
  identifier: string;
1677
1661
  /** @enum {string} */
@@ -1689,20 +1673,8 @@ interface operations {
1689
1673
  }[];
1690
1674
  model: string;
1691
1675
  temperature?: number;
1692
- max_tokens?: number;
1676
+ maxTokens?: number;
1693
1677
  demonstrations?: {
1694
- columns: {
1695
- id: string;
1696
- name: string;
1697
- /** @enum {string} */
1698
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1699
- }[];
1700
- /** @default [] */
1701
- rows: ({
1702
- id: string;
1703
- } & {
1704
- [key: string]: unknown;
1705
- })[];
1706
1678
  id?: string;
1707
1679
  name?: string;
1708
1680
  inline?: {
@@ -1715,16 +1687,102 @@ interface operations {
1715
1687
  }[];
1716
1688
  };
1717
1689
  };
1718
- prompting_technique?: {
1719
- ref?: string;
1690
+ promptingTechnique?: {
1691
+ /** @enum {string} */
1692
+ type: "few_shot" | "in_context" | "chain_of_thought";
1693
+ demonstrations?: {
1694
+ id?: string;
1695
+ name?: string;
1696
+ inline?: {
1697
+ records: {
1698
+ [key: string]: string[];
1699
+ };
1700
+ columnTypes: {
1701
+ name: string;
1702
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1703
+ }[];
1704
+ };
1705
+ };
1706
+ };
1707
+ responseFormat?: {
1708
+ /** @enum {string} */
1709
+ type: "json_schema";
1710
+ json_schema: {
1711
+ name: string;
1712
+ schema: Record<string, never>;
1713
+ } | null;
1714
+ };
1715
+ };
1716
+ conflictInfo?: {
1717
+ localVersion: number;
1718
+ remoteVersion: number;
1719
+ differences: string[];
1720
+ remoteConfigData: {
1721
+ prompt: string;
1722
+ /** @default [] */
1723
+ messages: {
1724
+ /** @enum {string} */
1725
+ role: "user" | "assistant" | "system";
1726
+ content: string;
1727
+ }[];
1728
+ inputs: {
1729
+ identifier: string;
1730
+ /** @enum {string} */
1731
+ type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict";
1732
+ }[];
1733
+ outputs: {
1734
+ identifier: string;
1735
+ /** @enum {string} */
1736
+ type: "str" | "float" | "bool" | "json_schema";
1737
+ json_schema?: {
1738
+ type: string;
1739
+ } & {
1740
+ [key: string]: unknown;
1741
+ };
1742
+ }[];
1743
+ model: string;
1744
+ temperature?: number;
1745
+ max_tokens?: number;
1746
+ demonstrations?: {
1747
+ id?: string;
1748
+ name?: string;
1749
+ inline?: {
1750
+ records: {
1751
+ [key: string]: string[];
1752
+ };
1753
+ columnTypes: {
1754
+ name: string;
1755
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1756
+ }[];
1757
+ };
1758
+ };
1759
+ prompting_technique?: {
1760
+ /** @enum {string} */
1761
+ type: "few_shot" | "in_context" | "chain_of_thought";
1762
+ demonstrations?: {
1763
+ id?: string;
1764
+ name?: string;
1765
+ inline?: {
1766
+ records: {
1767
+ [key: string]: string[];
1768
+ };
1769
+ columnTypes: {
1770
+ name: string;
1771
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1772
+ }[];
1773
+ };
1774
+ };
1775
+ };
1776
+ response_format?: {
1777
+ /** @enum {string} */
1778
+ type: "json_schema";
1779
+ json_schema: {
1780
+ name: string;
1781
+ schema: Record<string, never>;
1782
+ } | null;
1783
+ };
1720
1784
  };
1721
1785
  };
1722
- author?: {
1723
- name: string;
1724
- } | null;
1725
- handle: string | null;
1726
- /** @enum {string} */
1727
- scope: "ORGANIZATION" | "PROJECT";
1728
1786
  };
1729
1787
  };
1730
1788
  };
@@ -1735,31 +1793,20 @@ interface operations {
1735
1793
  };
1736
1794
  content: {
1737
1795
  "application/json": {
1738
- /** @enum {string} */
1739
- error: "Bad Request";
1796
+ error: string;
1797
+ message?: string;
1740
1798
  };
1741
1799
  };
1742
1800
  };
1743
1801
  /** @description Unauthorized */
1744
1802
  401: {
1745
- headers: {
1746
- [name: string]: unknown;
1747
- };
1748
- content: {
1749
- "application/json": {
1750
- /** @enum {string} */
1751
- error: "Unauthorized";
1752
- };
1753
- };
1754
- };
1755
- /** @description Prompt not found */
1756
- 404: {
1757
1803
  headers: {
1758
1804
  [name: string]: unknown;
1759
1805
  };
1760
1806
  content: {
1761
1807
  "application/json": {
1762
1808
  error: string;
1809
+ message?: string;
1763
1810
  };
1764
1811
  };
1765
1812
  };
@@ -1771,11 +1818,28 @@ interface operations {
1771
1818
  content: {
1772
1819
  "application/json": {
1773
1820
  error: string;
1821
+ message?: string;
1774
1822
  };
1775
1823
  };
1776
1824
  };
1777
1825
  };
1778
1826
  };
1827
+ postApiDatasetBySlugEntries: {
1828
+ parameters: {
1829
+ query?: never;
1830
+ header?: never;
1831
+ path: {
1832
+ slug: string;
1833
+ };
1834
+ cookie?: never;
1835
+ };
1836
+ requestBody?: {
1837
+ content: {
1838
+ "application/json": components["schemas"]["DatasetPostEntries"];
1839
+ };
1840
+ };
1841
+ responses: never;
1842
+ };
1779
1843
  getApiDatasetBySlugOrId: {
1780
1844
  parameters: {
1781
1845
  query?: never;
@@ -1814,7 +1878,6 @@ interface operations {
1814
1878
  };
1815
1879
  content: {
1816
1880
  "application/json": {
1817
- error?: string;
1818
1881
  /** @default error */
1819
1882
  status: string;
1820
1883
  message: string;
@@ -1828,7 +1891,6 @@ interface operations {
1828
1891
  };
1829
1892
  content: {
1830
1893
  "application/json": {
1831
- error?: string;
1832
1894
  /** @default error */
1833
1895
  status: string;
1834
1896
  message: string;
@@ -1842,7 +1904,6 @@ interface operations {
1842
1904
  };
1843
1905
  content: {
1844
1906
  "application/json": {
1845
- error?: string;
1846
1907
  /** @default error */
1847
1908
  status: string;
1848
1909
  message: string;
@@ -1869,7 +1930,6 @@ interface operations {
1869
1930
  };
1870
1931
  content: {
1871
1932
  "application/json": {
1872
- error?: string;
1873
1933
  /** @default error */
1874
1934
  status: string;
1875
1935
  message: string;
@@ -1878,6 +1938,323 @@ interface operations {
1878
1938
  };
1879
1939
  };
1880
1940
  };
1941
+ getApiPrompts: {
1942
+ parameters: {
1943
+ query?: never;
1944
+ header?: never;
1945
+ path?: never;
1946
+ cookie?: never;
1947
+ };
1948
+ requestBody?: never;
1949
+ responses: {
1950
+ /** @description Success */
1951
+ 200: {
1952
+ headers: {
1953
+ [name: string]: unknown;
1954
+ };
1955
+ content: {
1956
+ "application/json": {
1957
+ id: string;
1958
+ handle: string | null;
1959
+ /** @enum {string} */
1960
+ scope: "ORGANIZATION" | "PROJECT";
1961
+ name: string;
1962
+ updatedAt: string;
1963
+ projectId: string;
1964
+ organizationId: string;
1965
+ versionId: string;
1966
+ authorId?: string | null;
1967
+ version: number;
1968
+ createdAt: string;
1969
+ commitMessage?: string | null;
1970
+ prompt: string;
1971
+ /** @default [] */
1972
+ messages: {
1973
+ /** @enum {string} */
1974
+ role: "user" | "assistant" | "system";
1975
+ content: string;
1976
+ }[];
1977
+ inputs: {
1978
+ identifier: string;
1979
+ /** @enum {string} */
1980
+ type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict";
1981
+ }[];
1982
+ outputs: {
1983
+ identifier: string;
1984
+ /** @enum {string} */
1985
+ type: "str" | "float" | "bool" | "json_schema";
1986
+ json_schema?: {
1987
+ type: string;
1988
+ } & {
1989
+ [key: string]: unknown;
1990
+ };
1991
+ }[];
1992
+ model: string;
1993
+ temperature?: number;
1994
+ maxTokens?: number;
1995
+ demonstrations?: {
1996
+ id?: string;
1997
+ name?: string;
1998
+ inline?: {
1999
+ records: {
2000
+ [key: string]: string[];
2001
+ };
2002
+ columnTypes: {
2003
+ name: string;
2004
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
2005
+ }[];
2006
+ };
2007
+ };
2008
+ promptingTechnique?: {
2009
+ /** @enum {string} */
2010
+ type: "few_shot" | "in_context" | "chain_of_thought";
2011
+ demonstrations?: {
2012
+ id?: string;
2013
+ name?: string;
2014
+ inline?: {
2015
+ records: {
2016
+ [key: string]: string[];
2017
+ };
2018
+ columnTypes: {
2019
+ name: string;
2020
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
2021
+ }[];
2022
+ };
2023
+ };
2024
+ };
2025
+ responseFormat?: {
2026
+ /** @enum {string} */
2027
+ type: "json_schema";
2028
+ json_schema: {
2029
+ name: string;
2030
+ schema: Record<string, never>;
2031
+ } | null;
2032
+ };
2033
+ }[];
2034
+ };
2035
+ };
2036
+ /** @description Bad Request */
2037
+ 400: {
2038
+ headers: {
2039
+ [name: string]: unknown;
2040
+ };
2041
+ content: {
2042
+ "application/json": {
2043
+ error: string;
2044
+ message?: string;
2045
+ };
2046
+ };
2047
+ };
2048
+ /** @description Unauthorized */
2049
+ 401: {
2050
+ headers: {
2051
+ [name: string]: unknown;
2052
+ };
2053
+ content: {
2054
+ "application/json": {
2055
+ error: string;
2056
+ message?: string;
2057
+ };
2058
+ };
2059
+ };
2060
+ /** @description Internal Server Error */
2061
+ 500: {
2062
+ headers: {
2063
+ [name: string]: unknown;
2064
+ };
2065
+ content: {
2066
+ "application/json": {
2067
+ error: string;
2068
+ message?: string;
2069
+ };
2070
+ };
2071
+ };
2072
+ };
2073
+ };
2074
+ postApiPrompts: {
2075
+ parameters: {
2076
+ query?: never;
2077
+ header?: never;
2078
+ path?: never;
2079
+ cookie?: never;
2080
+ };
2081
+ requestBody?: {
2082
+ content: {
2083
+ "application/json": {
2084
+ handle: string;
2085
+ /**
2086
+ * @default PROJECT
2087
+ * @enum {string}
2088
+ */
2089
+ scope?: "ORGANIZATION" | "PROJECT";
2090
+ model?: string;
2091
+ temperature?: number;
2092
+ maxTokens?: number;
2093
+ commitMessage?: string;
2094
+ authorId?: string;
2095
+ prompt?: string;
2096
+ messages?: {
2097
+ /** @enum {string} */
2098
+ role: "user" | "assistant" | "system";
2099
+ content: string;
2100
+ }[];
2101
+ inputs?: {
2102
+ identifier: string;
2103
+ /** @enum {string} */
2104
+ type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict";
2105
+ }[];
2106
+ outputs?: {
2107
+ identifier: string;
2108
+ /** @enum {string} */
2109
+ type: "str" | "float" | "bool" | "json_schema";
2110
+ json_schema?: {
2111
+ type: string;
2112
+ } & {
2113
+ [key: string]: unknown;
2114
+ };
2115
+ }[];
2116
+ /** @enum {string} */
2117
+ schemaVersion?: "1.0";
2118
+ };
2119
+ };
2120
+ };
2121
+ responses: {
2122
+ /** @description Success */
2123
+ 200: {
2124
+ headers: {
2125
+ [name: string]: unknown;
2126
+ };
2127
+ content: {
2128
+ "application/json": {
2129
+ id: string;
2130
+ handle: string | null;
2131
+ /** @enum {string} */
2132
+ scope: "ORGANIZATION" | "PROJECT";
2133
+ name: string;
2134
+ updatedAt: string;
2135
+ projectId: string;
2136
+ organizationId: string;
2137
+ versionId: string;
2138
+ authorId?: string | null;
2139
+ version: number;
2140
+ createdAt: string;
2141
+ commitMessage?: string | null;
2142
+ prompt: string;
2143
+ /** @default [] */
2144
+ messages: {
2145
+ /** @enum {string} */
2146
+ role: "user" | "assistant" | "system";
2147
+ content: string;
2148
+ }[];
2149
+ inputs: {
2150
+ identifier: string;
2151
+ /** @enum {string} */
2152
+ type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict";
2153
+ }[];
2154
+ outputs: {
2155
+ identifier: string;
2156
+ /** @enum {string} */
2157
+ type: "str" | "float" | "bool" | "json_schema";
2158
+ json_schema?: {
2159
+ type: string;
2160
+ } & {
2161
+ [key: string]: unknown;
2162
+ };
2163
+ }[];
2164
+ model: string;
2165
+ temperature?: number;
2166
+ maxTokens?: number;
2167
+ demonstrations?: {
2168
+ id?: string;
2169
+ name?: string;
2170
+ inline?: {
2171
+ records: {
2172
+ [key: string]: string[];
2173
+ };
2174
+ columnTypes: {
2175
+ name: string;
2176
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
2177
+ }[];
2178
+ };
2179
+ };
2180
+ promptingTechnique?: {
2181
+ /** @enum {string} */
2182
+ type: "few_shot" | "in_context" | "chain_of_thought";
2183
+ demonstrations?: {
2184
+ id?: string;
2185
+ name?: string;
2186
+ inline?: {
2187
+ records: {
2188
+ [key: string]: string[];
2189
+ };
2190
+ columnTypes: {
2191
+ name: string;
2192
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
2193
+ }[];
2194
+ };
2195
+ };
2196
+ };
2197
+ responseFormat?: {
2198
+ /** @enum {string} */
2199
+ type: "json_schema";
2200
+ json_schema: {
2201
+ name: string;
2202
+ schema: Record<string, never>;
2203
+ } | null;
2204
+ };
2205
+ };
2206
+ };
2207
+ };
2208
+ /** @description Bad Request */
2209
+ 400: {
2210
+ headers: {
2211
+ [name: string]: unknown;
2212
+ };
2213
+ content: {
2214
+ "application/json": {
2215
+ error: string;
2216
+ message?: string;
2217
+ };
2218
+ };
2219
+ };
2220
+ /** @description Unauthorized */
2221
+ 401: {
2222
+ headers: {
2223
+ [name: string]: unknown;
2224
+ };
2225
+ content: {
2226
+ "application/json": {
2227
+ error: string;
2228
+ message?: string;
2229
+ };
2230
+ };
2231
+ };
2232
+ /** @description Conflict */
2233
+ 409: {
2234
+ headers: {
2235
+ [name: string]: unknown;
2236
+ };
2237
+ content: {
2238
+ "application/json": {
2239
+ error: string;
2240
+ message: string;
2241
+ };
2242
+ };
2243
+ };
2244
+ /** @description Internal Server Error */
2245
+ 500: {
2246
+ headers: {
2247
+ [name: string]: unknown;
2248
+ };
2249
+ content: {
2250
+ "application/json": {
2251
+ error: string;
2252
+ message?: string;
2253
+ };
2254
+ };
2255
+ };
2256
+ };
2257
+ };
1881
2258
  "postApiScenario-events": {
1882
2259
  parameters: {
1883
2260
  query?: never;
@@ -1926,7 +2303,7 @@ interface operations {
1926
2303
  type: "SCENARIO_MESSAGE_SNAPSHOT";
1927
2304
  timestamp: number;
1928
2305
  rawEvent?: unknown;
1929
- messages: ({
2306
+ messages: ((({
1930
2307
  id: string;
1931
2308
  /** @constant */
1932
2309
  role: "developer";
@@ -1965,6 +2342,51 @@ interface operations {
1965
2342
  /** @constant */
1966
2343
  role: "tool";
1967
2344
  toolCallId: string;
2345
+ }) | {
2346
+ role?: "system" | "user" | "assistant" | "function" | "tool" | "unknown";
2347
+ content?: string | ({
2348
+ /** @constant */
2349
+ type: "text";
2350
+ text?: string;
2351
+ } | {
2352
+ text: string;
2353
+ } | {
2354
+ /** @constant */
2355
+ type: "image_url";
2356
+ image_url?: {
2357
+ url: string;
2358
+ detail?: "auto" | "low" | "high";
2359
+ };
2360
+ } | {
2361
+ /** @constant */
2362
+ type: "tool_call";
2363
+ toolName?: string;
2364
+ toolCallId?: string;
2365
+ args?: string;
2366
+ } | {
2367
+ /** @constant */
2368
+ type: "tool_result";
2369
+ toolName?: string;
2370
+ toolCallId?: string;
2371
+ result?: unknown;
2372
+ })[] | null;
2373
+ function_call?: {
2374
+ name?: string;
2375
+ arguments?: string;
2376
+ } | null;
2377
+ tool_calls?: {
2378
+ id: string;
2379
+ type: string;
2380
+ function: {
2381
+ name?: string;
2382
+ arguments?: string;
2383
+ };
2384
+ }[] | null;
2385
+ tool_call_id?: string | null;
2386
+ name?: string | null;
2387
+ }) & {
2388
+ id?: string;
2389
+ trace_id?: string;
1968
2390
  })[];
1969
2391
  batchRunId: string;
1970
2392
  scenarioId: string;
@@ -2006,6 +2428,7 @@ interface operations {
2006
2428
  content: {
2007
2429
  "application/json": {
2008
2430
  error: string;
2431
+ message?: string;
2009
2432
  };
2010
2433
  };
2011
2434
  };
@@ -2017,6 +2440,7 @@ interface operations {
2017
2440
  content: {
2018
2441
  "application/json": {
2019
2442
  error: string;
2443
+ message?: string;
2020
2444
  };
2021
2445
  };
2022
2446
  };
@@ -2051,6 +2475,7 @@ interface operations {
2051
2475
  content: {
2052
2476
  "application/json": {
2053
2477
  error: string;
2478
+ message?: string;
2054
2479
  };
2055
2480
  };
2056
2481
  };
@@ -2062,6 +2487,7 @@ interface operations {
2062
2487
  content: {
2063
2488
  "application/json": {
2064
2489
  error: string;
2490
+ message?: string;
2065
2491
  };
2066
2492
  };
2067
2493
  };
@@ -2073,163 +2499,167 @@ interface operations {
2073
2499
  content: {
2074
2500
  "application/json": {
2075
2501
  error: string;
2502
+ message?: string;
2076
2503
  };
2077
2504
  };
2078
2505
  };
2079
2506
  };
2080
2507
  };
2081
- postApiPromptsByIdSync: {
2508
+ getIndex: {
2082
2509
  parameters: {
2083
2510
  query?: never;
2084
2511
  header?: never;
2085
- path: {
2086
- id: string;
2087
- };
2512
+ path?: never;
2088
2513
  cookie?: never;
2089
2514
  };
2090
- requestBody?: {
2091
- content: {
2092
- "application/json": {
2093
- configData: {
2094
- version?: number;
2515
+ requestBody?: never;
2516
+ responses: {
2517
+ /** @description Success */
2518
+ 200: {
2519
+ headers: {
2520
+ [name: string]: unknown;
2521
+ };
2522
+ content: {
2523
+ "application/json": {
2524
+ id: string;
2525
+ handle: string | null;
2526
+ /** @enum {string} */
2527
+ scope: "ORGANIZATION" | "PROJECT";
2528
+ name: string;
2529
+ updatedAt: string;
2530
+ projectId: string;
2531
+ organizationId: string;
2532
+ version: number;
2533
+ versionId: string;
2534
+ versionCreatedAt: string;
2535
+ model: string;
2095
2536
  prompt: string;
2096
- /** @default [] */
2097
- messages?: ({
2537
+ messages: {
2098
2538
  /** @enum {string} */
2099
2539
  role: "user" | "assistant" | "system";
2100
2540
  content: string;
2101
- } & {
2102
- [key: string]: unknown;
2103
- })[];
2104
- inputs: {
2105
- identifier: string;
2106
- /** @enum {string} */
2107
- type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict";
2108
2541
  }[];
2109
- outputs: {
2110
- identifier: string;
2542
+ response_format: {
2111
2543
  /** @enum {string} */
2112
- type: "str" | "float" | "bool" | "json_schema";
2113
- json_schema?: {
2114
- type: string;
2115
- } & {
2116
- [key: string]: unknown;
2117
- };
2118
- }[];
2119
- model: string;
2120
- temperature?: number;
2121
- max_tokens?: number;
2122
- demonstrations?: {
2123
- id?: string;
2124
- name?: string;
2125
- inline?: {
2126
- records: {
2127
- [key: string]: string[];
2128
- };
2129
- columnTypes: {
2130
- name: string;
2131
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
2132
- }[];
2544
+ type: "json_schema";
2545
+ json_schema: {
2546
+ name: string;
2547
+ schema: Record<string, never>;
2133
2548
  };
2134
- };
2135
- prompting_technique?: {
2136
- ref?: string;
2137
- };
2549
+ } | null;
2550
+ }[];
2551
+ };
2552
+ };
2553
+ /** @description Bad Request */
2554
+ 400: {
2555
+ headers: {
2556
+ [name: string]: unknown;
2557
+ };
2558
+ content: {
2559
+ "application/json": {
2560
+ error: string;
2138
2561
  };
2139
- localVersion?: number;
2140
- commitMessage?: string;
2562
+ };
2563
+ };
2564
+ /** @description Unauthorized */
2565
+ 401: {
2566
+ headers: {
2567
+ [name: string]: unknown;
2568
+ };
2569
+ content: {
2570
+ "application/json": {
2571
+ error: string;
2572
+ };
2573
+ };
2574
+ };
2575
+ /** @description Internal Server Error */
2576
+ 500: {
2577
+ headers: {
2578
+ [name: string]: unknown;
2579
+ };
2580
+ content: {
2581
+ "application/json": {
2582
+ error: string;
2583
+ };
2584
+ };
2585
+ };
2586
+ };
2587
+ };
2588
+ postIndex: {
2589
+ parameters: {
2590
+ query?: never;
2591
+ header?: never;
2592
+ path?: never;
2593
+ cookie?: never;
2594
+ };
2595
+ requestBody?: {
2596
+ content: {
2597
+ "application/json": {
2598
+ handle: string;
2599
+ /**
2600
+ * @default PROJECT
2601
+ * @enum {string}
2602
+ */
2603
+ scope?: "ORGANIZATION" | "PROJECT";
2604
+ authorId?: string;
2605
+ prompt?: string;
2606
+ messages?: {
2607
+ /** @enum {string} */
2608
+ role: "user" | "assistant" | "system";
2609
+ content: string;
2610
+ }[];
2611
+ inputs?: {
2612
+ identifier: string;
2613
+ /** @enum {string} */
2614
+ type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict";
2615
+ }[];
2616
+ outputs?: {
2617
+ identifier: string;
2618
+ /** @enum {string} */
2619
+ type: "str" | "float" | "bool" | "json_schema";
2620
+ json_schema?: {
2621
+ type: string;
2622
+ } & {
2623
+ [key: string]: unknown;
2624
+ };
2625
+ }[];
2141
2626
  };
2142
2627
  };
2143
2628
  };
2144
2629
  responses: {
2145
- /** @description Sync result */
2630
+ /** @description Success */
2146
2631
  200: {
2147
2632
  headers: {
2148
2633
  [name: string]: unknown;
2149
2634
  };
2150
2635
  content: {
2151
2636
  "application/json": {
2637
+ id: string;
2638
+ handle: string | null;
2152
2639
  /** @enum {string} */
2153
- action: "created" | "updated" | "conflict" | "up_to_date";
2154
- prompt?: {
2155
- id: string;
2156
- handle: string | null;
2640
+ scope: "ORGANIZATION" | "PROJECT";
2641
+ name: string;
2642
+ updatedAt: string;
2643
+ projectId: string;
2644
+ organizationId: string;
2645
+ version: number;
2646
+ versionId: string;
2647
+ versionCreatedAt: string;
2648
+ model: string;
2649
+ prompt: string;
2650
+ messages: {
2157
2651
  /** @enum {string} */
2158
- scope: "ORGANIZATION" | "PROJECT";
2159
- name: string;
2160
- updatedAt: string;
2161
- version: number;
2162
- versionId: string;
2163
- versionCreatedAt: string;
2164
- model: string;
2165
- prompt: string;
2166
- messages: ({
2167
- /** @enum {string} */
2168
- role: "user" | "assistant" | "system";
2169
- content: string;
2170
- } & {
2171
- [key: string]: unknown;
2172
- })[];
2173
- response_format: {
2174
- /** @enum {string} */
2175
- type: "json_schema";
2176
- json_schema: {
2177
- name: string;
2178
- schema: Record<string, never>;
2179
- };
2180
- } | null;
2181
- };
2182
- conflictInfo?: {
2183
- localVersion: number;
2184
- remoteVersion: number;
2185
- differences: string[];
2186
- remoteConfigData: {
2187
- version?: number;
2188
- prompt: string;
2189
- /** @default [] */
2190
- messages: ({
2191
- /** @enum {string} */
2192
- role: "user" | "assistant" | "system";
2193
- content: string;
2194
- } & {
2195
- [key: string]: unknown;
2196
- })[];
2197
- inputs: {
2198
- identifier: string;
2199
- /** @enum {string} */
2200
- type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict";
2201
- }[];
2202
- outputs: {
2203
- identifier: string;
2204
- /** @enum {string} */
2205
- type: "str" | "float" | "bool" | "json_schema";
2206
- json_schema?: {
2207
- type: string;
2208
- } & {
2209
- [key: string]: unknown;
2210
- };
2211
- }[];
2212
- model: string;
2213
- temperature?: number;
2214
- max_tokens?: number;
2215
- demonstrations?: {
2216
- id?: string;
2217
- name?: string;
2218
- inline?: {
2219
- records: {
2220
- [key: string]: string[];
2221
- };
2222
- columnTypes: {
2223
- name: string;
2224
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
2225
- }[];
2226
- };
2227
- };
2228
- prompting_technique?: {
2229
- ref?: string;
2230
- };
2652
+ role: "user" | "assistant" | "system";
2653
+ content: string;
2654
+ }[];
2655
+ response_format: {
2656
+ /** @enum {string} */
2657
+ type: "json_schema";
2658
+ json_schema: {
2659
+ name: string;
2660
+ schema: Record<string, never>;
2231
2661
  };
2232
- };
2662
+ } | null;
2233
2663
  };
2234
2664
  };
2235
2665
  };
@@ -2272,25 +2702,35 @@ interface operations {
2272
2702
 
2273
2703
  type PromptResponse = NonNullable<paths["/api/prompts/{id}"]["get"]["responses"]["200"]["content"]["application/json"]>;
2274
2704
  type TemplateVariables = Record<string, string | number | boolean | object | null>;
2705
+ /**
2706
+ * The Prompt class provides a standardized interface for working with prompt objects
2707
+ * within the SDK, ensuring consistent structure and behavior regardless of the underlying
2708
+ * client implementation. This abstraction enables the SDK to maintain control over prompt
2709
+ * handling, enforce type safety, and facilitate future enhancements without exposing
2710
+ * internal details or requiring changes from client code.
2711
+ */
2275
2712
  declare class Prompt implements PromptResponse {
2276
- private readonly promptData;
2277
- readonly id: string;
2278
- readonly handle: string | null;
2279
- readonly scope: "ORGANIZATION" | "PROJECT";
2280
- readonly name: string;
2281
- readonly updatedAt: string;
2282
- readonly version: number;
2283
- readonly versionId: string;
2284
- readonly versionCreatedAt: string;
2285
- readonly model: string;
2286
- readonly prompt: string;
2713
+ readonly raw: PromptResponse;
2714
+ readonly id: PromptResponse["id"];
2715
+ readonly handle: PromptResponse["handle"];
2716
+ readonly name: PromptResponse["name"];
2717
+ readonly scope: PromptResponse["scope"];
2718
+ readonly projectId: PromptResponse["projectId"];
2719
+ readonly organizationId: PromptResponse["organizationId"];
2720
+ readonly authorId: PromptResponse["authorId"];
2721
+ readonly createdAt: PromptResponse["createdAt"];
2722
+ readonly updatedAt: PromptResponse["updatedAt"];
2723
+ readonly version: PromptResponse["version"];
2724
+ readonly versionId: PromptResponse["versionId"];
2725
+ readonly model: PromptResponse["model"];
2726
+ readonly temperature: PromptResponse["temperature"];
2727
+ readonly maxTokens: PromptResponse["maxTokens"];
2728
+ readonly responseFormat: PromptResponse["responseFormat"];
2729
+ readonly prompt: PromptResponse["prompt"];
2287
2730
  readonly messages: PromptResponse["messages"];
2288
- readonly response_format: PromptResponse["response_format"];
2289
- constructor(promptData: PromptResponse);
2290
- /**
2291
- * Get the raw prompt data from the API
2292
- */
2293
- get raw(): PromptResponse;
2731
+ readonly inputs: PromptResponse["inputs"];
2732
+ readonly outputs: PromptResponse["outputs"];
2733
+ constructor(raw: PromptResponse);
2294
2734
  /**
2295
2735
  * Compile the prompt template with provided variables (lenient - missing variables become empty)
2296
2736
  * @param variables - Object containing variable values for template compilation