llama-stack-client 0.2.18 → 0.2.19-rc2

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 (118) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/index.d.mts +12 -11
  3. package/index.d.ts +12 -11
  4. package/index.d.ts.map +1 -1
  5. package/index.js +3 -0
  6. package/index.js.map +1 -1
  7. package/index.mjs +6 -3
  8. package/index.mjs.map +1 -1
  9. package/package.json +4 -1
  10. package/pagination.d.ts +19 -0
  11. package/pagination.d.ts.map +1 -1
  12. package/pagination.js +42 -1
  13. package/pagination.js.map +1 -1
  14. package/pagination.mjs +40 -0
  15. package/pagination.mjs.map +1 -1
  16. package/resources/chat/chat.d.ts +2 -2
  17. package/resources/chat/chat.d.ts.map +1 -1
  18. package/resources/chat/chat.js +1 -0
  19. package/resources/chat/chat.js.map +1 -1
  20. package/resources/chat/chat.mjs +2 -1
  21. package/resources/chat/chat.mjs.map +1 -1
  22. package/resources/chat/completions.d.ts +414 -446
  23. package/resources/chat/completions.d.ts.map +1 -1
  24. package/resources/chat/completions.js +7 -2
  25. package/resources/chat/completions.js.map +1 -1
  26. package/resources/chat/completions.mjs +5 -1
  27. package/resources/chat/completions.mjs.map +1 -1
  28. package/resources/chat/index.d.ts +1 -1
  29. package/resources/chat/index.d.ts.map +1 -1
  30. package/resources/chat/index.js +2 -1
  31. package/resources/chat/index.js.map +1 -1
  32. package/resources/chat/index.mjs +1 -1
  33. package/resources/chat/index.mjs.map +1 -1
  34. package/resources/files.d.ts +10 -19
  35. package/resources/files.d.ts.map +1 -1
  36. package/resources/files.js +7 -2
  37. package/resources/files.js.map +1 -1
  38. package/resources/files.mjs +5 -1
  39. package/resources/files.mjs.map +1 -1
  40. package/resources/index.d.ts +4 -4
  41. package/resources/index.d.ts.map +1 -1
  42. package/resources/index.js +4 -1
  43. package/resources/index.js.map +1 -1
  44. package/resources/index.mjs +3 -3
  45. package/resources/index.mjs.map +1 -1
  46. package/resources/inference.d.ts +2 -38
  47. package/resources/inference.d.ts.map +1 -1
  48. package/resources/moderations.d.ts +1 -5
  49. package/resources/moderations.d.ts.map +1 -1
  50. package/resources/responses/index.d.ts +1 -1
  51. package/resources/responses/index.d.ts.map +1 -1
  52. package/resources/responses/index.js +2 -1
  53. package/resources/responses/index.js.map +1 -1
  54. package/resources/responses/index.mjs +1 -1
  55. package/resources/responses/index.mjs.map +1 -1
  56. package/resources/responses/input-items.d.ts +30 -3
  57. package/resources/responses/input-items.d.ts.map +1 -1
  58. package/resources/responses/responses.d.ts +604 -470
  59. package/resources/responses/responses.d.ts.map +1 -1
  60. package/resources/responses/responses.js +10 -2
  61. package/resources/responses/responses.js.map +1 -1
  62. package/resources/responses/responses.mjs +8 -1
  63. package/resources/responses/responses.mjs.map +1 -1
  64. package/resources/scoring-functions.d.ts +12 -3
  65. package/resources/scoring-functions.d.ts.map +1 -1
  66. package/resources/scoring-functions.js.map +1 -1
  67. package/resources/scoring-functions.mjs.map +1 -1
  68. package/resources/shared.d.ts +19 -28
  69. package/resources/shared.d.ts.map +1 -1
  70. package/resources/telemetry.d.ts +98 -1
  71. package/resources/telemetry.d.ts.map +1 -1
  72. package/resources/telemetry.js +6 -0
  73. package/resources/telemetry.js.map +1 -1
  74. package/resources/telemetry.mjs +6 -0
  75. package/resources/telemetry.mjs.map +1 -1
  76. package/resources/vector-stores/files.d.ts +7 -39
  77. package/resources/vector-stores/files.d.ts.map +1 -1
  78. package/resources/vector-stores/files.js +7 -2
  79. package/resources/vector-stores/files.js.map +1 -1
  80. package/resources/vector-stores/files.mjs +5 -1
  81. package/resources/vector-stores/files.mjs.map +1 -1
  82. package/resources/vector-stores/index.d.ts +2 -2
  83. package/resources/vector-stores/index.d.ts.map +1 -1
  84. package/resources/vector-stores/index.js +3 -1
  85. package/resources/vector-stores/index.js.map +1 -1
  86. package/resources/vector-stores/index.mjs +2 -2
  87. package/resources/vector-stores/index.mjs.map +1 -1
  88. package/resources/vector-stores/vector-stores.d.ts +9 -16
  89. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  90. package/resources/vector-stores/vector-stores.js +11 -2
  91. package/resources/vector-stores/vector-stores.js.map +1 -1
  92. package/resources/vector-stores/vector-stores.mjs +10 -2
  93. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  94. package/src/index.ts +27 -3
  95. package/src/pagination.ts +70 -0
  96. package/src/resources/chat/chat.ts +3 -0
  97. package/src/resources/chat/completions.ts +483 -510
  98. package/src/resources/chat/index.ts +1 -0
  99. package/src/resources/files.ts +14 -22
  100. package/src/resources/index.ts +5 -0
  101. package/src/resources/inference.ts +2 -44
  102. package/src/resources/moderations.ts +1 -5
  103. package/src/resources/responses/index.ts +1 -0
  104. package/src/resources/responses/input-items.ts +33 -1
  105. package/src/resources/responses/responses.ts +700 -532
  106. package/src/resources/scoring-functions.ts +34 -3
  107. package/src/resources/shared.ts +22 -43
  108. package/src/resources/telemetry.ts +128 -0
  109. package/src/resources/vector-stores/files.ts +18 -48
  110. package/src/resources/vector-stores/index.ts +2 -1
  111. package/src/resources/vector-stores/vector-stores.ts +16 -19
  112. package/src/version.ts +1 -1
  113. package/version.d.ts +1 -1
  114. package/version.d.ts.map +1 -1
  115. package/version.js +1 -1
  116. package/version.js.map +1 -1
  117. package/version.mjs +1 -1
  118. package/version.mjs.map +1 -1
@@ -3,6 +3,7 @@ import { APIPromise } from "../../core.js";
3
3
  import * as Core from "../../core.js";
4
4
  import * as CompletionsAPI from "./completions.js";
5
5
  import * as ChatAPI from "./chat.js";
6
+ import { OpenAICursorPage, type OpenAICursorPageParams } from "../../pagination.js";
6
7
  import { Stream } from "../../streaming.js";
7
8
  export declare class Completions extends APIResource {
8
9
  /**
@@ -19,8 +20,10 @@ export declare class Completions extends APIResource {
19
20
  /**
20
21
  * List all chat completions.
21
22
  */
22
- list(query?: CompletionListParams, options?: Core.RequestOptions): Core.APIPromise<CompletionListResponse>;
23
- list(options?: Core.RequestOptions): Core.APIPromise<CompletionListResponse>;
23
+ list(query?: CompletionListParams, options?: Core.RequestOptions): Core.PagePromise<CompletionListResponsesOpenAICursorPage, CompletionListResponse>;
24
+ list(options?: Core.RequestOptions): Core.PagePromise<CompletionListResponsesOpenAICursorPage, CompletionListResponse>;
25
+ }
26
+ export declare class CompletionListResponsesOpenAICursorPage extends OpenAICursorPage<CompletionListResponse> {
24
27
  }
25
28
  /**
26
29
  * Response from an OpenAI-compatible chat completion request.
@@ -969,401 +972,285 @@ export declare namespace CompletionRetrieveResponse {
969
972
  }
970
973
  }
971
974
  }
972
- /**
973
- * Response from listing OpenAI-compatible chat completions.
974
- */
975
975
  export interface CompletionListResponse {
976
976
  /**
977
- * List of chat completion objects with their input messages
977
+ * The ID of the chat completion
978
978
  */
979
- data: Array<CompletionListResponse.Data>;
979
+ id: string;
980
980
  /**
981
- * ID of the first completion in this list
981
+ * List of choices
982
982
  */
983
- first_id: string;
983
+ choices: Array<CompletionListResponse.Choice>;
984
984
  /**
985
- * Whether there are more completions available beyond this list
985
+ * The Unix timestamp in seconds when the chat completion was created
986
986
  */
987
- has_more: boolean;
987
+ created: number;
988
+ input_messages: Array<CompletionListResponse.OpenAIUserMessageParam | CompletionListResponse.OpenAISystemMessageParam | CompletionListResponse.OpenAIAssistantMessageParam | CompletionListResponse.OpenAIToolMessageParam | CompletionListResponse.OpenAIDeveloperMessageParam>;
988
989
  /**
989
- * ID of the last completion in this list
990
+ * The model that was used to generate the chat completion
990
991
  */
991
- last_id: string;
992
+ model: string;
992
993
  /**
993
- * Must be "list" to identify this as a list response
994
+ * The object type, which will be "chat.completion"
994
995
  */
995
- object: 'list';
996
+ object: 'chat.completion';
996
997
  }
997
998
  export declare namespace CompletionListResponse {
998
- interface Data {
999
- /**
1000
- * The ID of the chat completion
1001
- */
1002
- id: string;
999
+ /**
1000
+ * A choice from an OpenAI-compatible chat completion response.
1001
+ */
1002
+ interface Choice {
1003
1003
  /**
1004
- * List of choices
1004
+ * The reason the model stopped generating
1005
1005
  */
1006
- choices: Array<Data.Choice>;
1006
+ finish_reason: string;
1007
1007
  /**
1008
- * The Unix timestamp in seconds when the chat completion was created
1008
+ * The index of the choice
1009
1009
  */
1010
- created: number;
1011
- input_messages: Array<Data.OpenAIUserMessageParam | Data.OpenAISystemMessageParam | Data.OpenAIAssistantMessageParam | Data.OpenAIToolMessageParam | Data.OpenAIDeveloperMessageParam>;
1010
+ index: number;
1012
1011
  /**
1013
- * The model that was used to generate the chat completion
1012
+ * The message from the model
1014
1013
  */
1015
- model: string;
1014
+ message: Choice.OpenAIUserMessageParam | Choice.OpenAISystemMessageParam | Choice.OpenAIAssistantMessageParam | Choice.OpenAIToolMessageParam | Choice.OpenAIDeveloperMessageParam;
1016
1015
  /**
1017
- * The object type, which will be "chat.completion"
1016
+ * (Optional) The log probabilities for the tokens in the message
1018
1017
  */
1019
- object: 'chat.completion';
1018
+ logprobs?: Choice.Logprobs;
1020
1019
  }
1021
- namespace Data {
1020
+ namespace Choice {
1022
1021
  /**
1023
- * A choice from an OpenAI-compatible chat completion response.
1022
+ * A message from the user in an OpenAI-compatible chat completion request.
1024
1023
  */
1025
- interface Choice {
1026
- /**
1027
- * The reason the model stopped generating
1028
- */
1029
- finish_reason: string;
1024
+ interface OpenAIUserMessageParam {
1030
1025
  /**
1031
- * The index of the choice
1026
+ * The content of the message, which can include text and other media
1032
1027
  */
1033
- index: number;
1028
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParam.OpenAIFile>;
1034
1029
  /**
1035
- * The message from the model
1030
+ * Must be "user" to identify this as a user message
1036
1031
  */
1037
- message: Choice.OpenAIUserMessageParam | Choice.OpenAISystemMessageParam | Choice.OpenAIAssistantMessageParam | Choice.OpenAIToolMessageParam | Choice.OpenAIDeveloperMessageParam;
1032
+ role: 'user';
1038
1033
  /**
1039
- * (Optional) The log probabilities for the tokens in the message
1034
+ * (Optional) The name of the user message participant.
1040
1035
  */
1041
- logprobs?: Choice.Logprobs;
1036
+ name?: string;
1042
1037
  }
1043
- namespace Choice {
1038
+ namespace OpenAIUserMessageParam {
1044
1039
  /**
1045
- * A message from the user in an OpenAI-compatible chat completion request.
1040
+ * Text content part for OpenAI-compatible chat completion messages.
1046
1041
  */
1047
- interface OpenAIUserMessageParam {
1042
+ interface OpenAIChatCompletionContentPartTextParam {
1048
1043
  /**
1049
- * The content of the message, which can include text and other media
1044
+ * The text content of the message
1050
1045
  */
1051
- content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParam.OpenAIFile>;
1046
+ text: string;
1052
1047
  /**
1053
- * Must be "user" to identify this as a user message
1048
+ * Must be "text" to identify this as text content
1054
1049
  */
1055
- role: 'user';
1050
+ type: 'text';
1051
+ }
1052
+ /**
1053
+ * Image content part for OpenAI-compatible chat completion messages.
1054
+ */
1055
+ interface OpenAIChatCompletionContentPartImageParam {
1056
1056
  /**
1057
- * (Optional) The name of the user message participant.
1057
+ * Image URL specification and processing details
1058
1058
  */
1059
- name?: string;
1060
- }
1061
- namespace OpenAIUserMessageParam {
1059
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1062
1060
  /**
1063
- * Text content part for OpenAI-compatible chat completion messages.
1061
+ * Must be "image_url" to identify this as image content
1064
1062
  */
1065
- interface OpenAIChatCompletionContentPartTextParam {
1066
- /**
1067
- * The text content of the message
1068
- */
1069
- text: string;
1070
- /**
1071
- * Must be "text" to identify this as text content
1072
- */
1073
- type: 'text';
1074
- }
1063
+ type: 'image_url';
1064
+ }
1065
+ namespace OpenAIChatCompletionContentPartImageParam {
1075
1066
  /**
1076
- * Image content part for OpenAI-compatible chat completion messages.
1067
+ * Image URL specification and processing details
1077
1068
  */
1078
- interface OpenAIChatCompletionContentPartImageParam {
1079
- /**
1080
- * Image URL specification and processing details
1081
- */
1082
- image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1069
+ interface ImageURL {
1083
1070
  /**
1084
- * Must be "image_url" to identify this as image content
1071
+ * URL of the image to include in the message
1085
1072
  */
1086
- type: 'image_url';
1087
- }
1088
- namespace OpenAIChatCompletionContentPartImageParam {
1073
+ url: string;
1089
1074
  /**
1090
- * Image URL specification and processing details
1075
+ * (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
1091
1076
  */
1092
- interface ImageURL {
1093
- /**
1094
- * URL of the image to include in the message
1095
- */
1096
- url: string;
1097
- /**
1098
- * (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
1099
- */
1100
- detail?: string;
1101
- }
1102
- }
1103
- interface OpenAIFile {
1104
- file: OpenAIFile.File;
1105
- type: 'file';
1077
+ detail?: string;
1106
1078
  }
1107
- namespace OpenAIFile {
1108
- interface File {
1109
- file_data?: string;
1110
- file_id?: string;
1111
- filename?: string;
1112
- }
1079
+ }
1080
+ interface OpenAIFile {
1081
+ file: OpenAIFile.File;
1082
+ type: 'file';
1083
+ }
1084
+ namespace OpenAIFile {
1085
+ interface File {
1086
+ file_data?: string;
1087
+ file_id?: string;
1088
+ filename?: string;
1113
1089
  }
1114
1090
  }
1091
+ }
1092
+ /**
1093
+ * A system message providing instructions or context to the model.
1094
+ */
1095
+ interface OpenAISystemMessageParam {
1115
1096
  /**
1116
- * A system message providing instructions or context to the model.
1097
+ * The content of the "system prompt". If multiple system messages are provided,
1098
+ * they are concatenated. The underlying Llama Stack code may also add other system
1099
+ * messages (for example, for formatting tool definitions).
1117
1100
  */
1118
- interface OpenAISystemMessageParam {
1101
+ content: string | Array<OpenAISystemMessageParam.UnionMember1>;
1102
+ /**
1103
+ * Must be "system" to identify this as a system message
1104
+ */
1105
+ role: 'system';
1106
+ /**
1107
+ * (Optional) The name of the system message participant.
1108
+ */
1109
+ name?: string;
1110
+ }
1111
+ namespace OpenAISystemMessageParam {
1112
+ /**
1113
+ * Text content part for OpenAI-compatible chat completion messages.
1114
+ */
1115
+ interface UnionMember1 {
1119
1116
  /**
1120
- * The content of the "system prompt". If multiple system messages are provided,
1121
- * they are concatenated. The underlying Llama Stack code may also add other system
1122
- * messages (for example, for formatting tool definitions).
1117
+ * The text content of the message
1123
1118
  */
1124
- content: string | Array<OpenAISystemMessageParam.UnionMember1>;
1119
+ text: string;
1125
1120
  /**
1126
- * Must be "system" to identify this as a system message
1121
+ * Must be "text" to identify this as text content
1127
1122
  */
1128
- role: 'system';
1123
+ type: 'text';
1124
+ }
1125
+ }
1126
+ /**
1127
+ * A message containing the model's (assistant) response in an OpenAI-compatible
1128
+ * chat completion request.
1129
+ */
1130
+ interface OpenAIAssistantMessageParam {
1131
+ /**
1132
+ * Must be "assistant" to identify this as the model's response
1133
+ */
1134
+ role: 'assistant';
1135
+ /**
1136
+ * The content of the model's response
1137
+ */
1138
+ content?: string | Array<OpenAIAssistantMessageParam.UnionMember1>;
1139
+ /**
1140
+ * (Optional) The name of the assistant message participant.
1141
+ */
1142
+ name?: string;
1143
+ /**
1144
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
1145
+ */
1146
+ tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
1147
+ }
1148
+ namespace OpenAIAssistantMessageParam {
1149
+ /**
1150
+ * Text content part for OpenAI-compatible chat completion messages.
1151
+ */
1152
+ interface UnionMember1 {
1129
1153
  /**
1130
- * (Optional) The name of the system message participant.
1154
+ * The text content of the message
1131
1155
  */
1132
- name?: string;
1133
- }
1134
- namespace OpenAISystemMessageParam {
1156
+ text: string;
1135
1157
  /**
1136
- * Text content part for OpenAI-compatible chat completion messages.
1158
+ * Must be "text" to identify this as text content
1137
1159
  */
1138
- interface UnionMember1 {
1139
- /**
1140
- * The text content of the message
1141
- */
1142
- text: string;
1143
- /**
1144
- * Must be "text" to identify this as text content
1145
- */
1146
- type: 'text';
1147
- }
1160
+ type: 'text';
1148
1161
  }
1149
1162
  /**
1150
- * A message containing the model's (assistant) response in an OpenAI-compatible
1151
- * chat completion request.
1163
+ * Tool call specification for OpenAI-compatible chat completion responses.
1152
1164
  */
1153
- interface OpenAIAssistantMessageParam {
1165
+ interface ToolCall {
1154
1166
  /**
1155
- * Must be "assistant" to identify this as the model's response
1167
+ * Must be "function" to identify this as a function call
1156
1168
  */
1157
- role: 'assistant';
1169
+ type: 'function';
1158
1170
  /**
1159
- * The content of the model's response
1171
+ * (Optional) Unique identifier for the tool call
1160
1172
  */
1161
- content?: string | Array<OpenAIAssistantMessageParam.UnionMember1>;
1173
+ id?: string;
1162
1174
  /**
1163
- * (Optional) The name of the assistant message participant.
1175
+ * (Optional) Function call details
1164
1176
  */
1165
- name?: string;
1177
+ function?: ToolCall.Function;
1166
1178
  /**
1167
- * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
1179
+ * (Optional) Index of the tool call in the list
1168
1180
  */
1169
- tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
1181
+ index?: number;
1170
1182
  }
1171
- namespace OpenAIAssistantMessageParam {
1183
+ namespace ToolCall {
1172
1184
  /**
1173
- * Text content part for OpenAI-compatible chat completion messages.
1185
+ * (Optional) Function call details
1174
1186
  */
1175
- interface UnionMember1 {
1187
+ interface Function {
1176
1188
  /**
1177
- * The text content of the message
1189
+ * (Optional) Arguments to pass to the function as a JSON string
1178
1190
  */
1179
- text: string;
1180
- /**
1181
- * Must be "text" to identify this as text content
1182
- */
1183
- type: 'text';
1184
- }
1185
- /**
1186
- * Tool call specification for OpenAI-compatible chat completion responses.
1187
- */
1188
- interface ToolCall {
1189
- /**
1190
- * Must be "function" to identify this as a function call
1191
- */
1192
- type: 'function';
1193
- /**
1194
- * (Optional) Unique identifier for the tool call
1195
- */
1196
- id?: string;
1197
- /**
1198
- * (Optional) Function call details
1199
- */
1200
- function?: ToolCall.Function;
1201
- /**
1202
- * (Optional) Index of the tool call in the list
1203
- */
1204
- index?: number;
1205
- }
1206
- namespace ToolCall {
1191
+ arguments?: string;
1207
1192
  /**
1208
- * (Optional) Function call details
1193
+ * (Optional) Name of the function to call
1209
1194
  */
1210
- interface Function {
1211
- /**
1212
- * (Optional) Arguments to pass to the function as a JSON string
1213
- */
1214
- arguments?: string;
1215
- /**
1216
- * (Optional) Name of the function to call
1217
- */
1218
- name?: string;
1219
- }
1195
+ name?: string;
1220
1196
  }
1221
1197
  }
1198
+ }
1199
+ /**
1200
+ * A message representing the result of a tool invocation in an OpenAI-compatible
1201
+ * chat completion request.
1202
+ */
1203
+ interface OpenAIToolMessageParam {
1222
1204
  /**
1223
- * A message representing the result of a tool invocation in an OpenAI-compatible
1224
- * chat completion request.
1205
+ * The response content from the tool
1225
1206
  */
1226
- interface OpenAIToolMessageParam {
1227
- /**
1228
- * The response content from the tool
1229
- */
1230
- content: string | Array<OpenAIToolMessageParam.UnionMember1>;
1231
- /**
1232
- * Must be "tool" to identify this as a tool response
1233
- */
1234
- role: 'tool';
1235
- /**
1236
- * Unique identifier for the tool call this response is for
1237
- */
1238
- tool_call_id: string;
1239
- }
1240
- namespace OpenAIToolMessageParam {
1241
- /**
1242
- * Text content part for OpenAI-compatible chat completion messages.
1243
- */
1244
- interface UnionMember1 {
1245
- /**
1246
- * The text content of the message
1247
- */
1248
- text: string;
1249
- /**
1250
- * Must be "text" to identify this as text content
1251
- */
1252
- type: 'text';
1253
- }
1254
- }
1207
+ content: string | Array<OpenAIToolMessageParam.UnionMember1>;
1255
1208
  /**
1256
- * A message from the developer in an OpenAI-compatible chat completion request.
1209
+ * Must be "tool" to identify this as a tool response
1257
1210
  */
1258
- interface OpenAIDeveloperMessageParam {
1259
- /**
1260
- * The content of the developer message
1261
- */
1262
- content: string | Array<OpenAIDeveloperMessageParam.UnionMember1>;
1263
- /**
1264
- * Must be "developer" to identify this as a developer message
1265
- */
1266
- role: 'developer';
1267
- /**
1268
- * (Optional) The name of the developer message participant.
1269
- */
1270
- name?: string;
1271
- }
1272
- namespace OpenAIDeveloperMessageParam {
1273
- /**
1274
- * Text content part for OpenAI-compatible chat completion messages.
1275
- */
1276
- interface UnionMember1 {
1277
- /**
1278
- * The text content of the message
1279
- */
1280
- text: string;
1281
- /**
1282
- * Must be "text" to identify this as text content
1283
- */
1284
- type: 'text';
1285
- }
1286
- }
1211
+ role: 'tool';
1287
1212
  /**
1288
- * (Optional) The log probabilities for the tokens in the message
1213
+ * Unique identifier for the tool call this response is for
1289
1214
  */
1290
- interface Logprobs {
1291
- /**
1292
- * (Optional) The log probabilities for the tokens in the message
1293
- */
1294
- content?: Array<Logprobs.Content>;
1295
- /**
1296
- * (Optional) The log probabilities for the tokens in the message
1297
- */
1298
- refusal?: Array<Logprobs.Refusal>;
1299
- }
1300
- namespace Logprobs {
1215
+ tool_call_id: string;
1216
+ }
1217
+ namespace OpenAIToolMessageParam {
1218
+ /**
1219
+ * Text content part for OpenAI-compatible chat completion messages.
1220
+ */
1221
+ interface UnionMember1 {
1301
1222
  /**
1302
- * The log probability for a token from an OpenAI-compatible chat completion
1303
- * response.
1223
+ * The text content of the message
1304
1224
  */
1305
- interface Content {
1306
- token: string;
1307
- logprob: number;
1308
- top_logprobs: Array<Content.TopLogprob>;
1309
- bytes?: Array<number>;
1310
- }
1311
- namespace Content {
1312
- /**
1313
- * The top log probability for a token from an OpenAI-compatible chat completion
1314
- * response.
1315
- */
1316
- interface TopLogprob {
1317
- token: string;
1318
- logprob: number;
1319
- bytes?: Array<number>;
1320
- }
1321
- }
1225
+ text: string;
1322
1226
  /**
1323
- * The log probability for a token from an OpenAI-compatible chat completion
1324
- * response.
1227
+ * Must be "text" to identify this as text content
1325
1228
  */
1326
- interface Refusal {
1327
- token: string;
1328
- logprob: number;
1329
- top_logprobs: Array<Refusal.TopLogprob>;
1330
- bytes?: Array<number>;
1331
- }
1332
- namespace Refusal {
1333
- /**
1334
- * The top log probability for a token from an OpenAI-compatible chat completion
1335
- * response.
1336
- */
1337
- interface TopLogprob {
1338
- token: string;
1339
- logprob: number;
1340
- bytes?: Array<number>;
1341
- }
1342
- }
1229
+ type: 'text';
1343
1230
  }
1344
1231
  }
1345
1232
  /**
1346
- * A message from the user in an OpenAI-compatible chat completion request.
1233
+ * A message from the developer in an OpenAI-compatible chat completion request.
1347
1234
  */
1348
- interface OpenAIUserMessageParam {
1235
+ interface OpenAIDeveloperMessageParam {
1349
1236
  /**
1350
- * The content of the message, which can include text and other media
1237
+ * The content of the developer message
1351
1238
  */
1352
- content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParam.OpenAIFile>;
1239
+ content: string | Array<OpenAIDeveloperMessageParam.UnionMember1>;
1353
1240
  /**
1354
- * Must be "user" to identify this as a user message
1241
+ * Must be "developer" to identify this as a developer message
1355
1242
  */
1356
- role: 'user';
1243
+ role: 'developer';
1357
1244
  /**
1358
- * (Optional) The name of the user message participant.
1245
+ * (Optional) The name of the developer message participant.
1359
1246
  */
1360
1247
  name?: string;
1361
1248
  }
1362
- namespace OpenAIUserMessageParam {
1249
+ namespace OpenAIDeveloperMessageParam {
1363
1250
  /**
1364
1251
  * Text content part for OpenAI-compatible chat completion messages.
1365
1252
  */
1366
- interface OpenAIChatCompletionContentPartTextParam {
1253
+ interface UnionMember1 {
1367
1254
  /**
1368
1255
  * The text content of the message
1369
1256
  */
@@ -1373,217 +1260,306 @@ export declare namespace CompletionListResponse {
1373
1260
  */
1374
1261
  type: 'text';
1375
1262
  }
1263
+ }
1264
+ /**
1265
+ * (Optional) The log probabilities for the tokens in the message
1266
+ */
1267
+ interface Logprobs {
1376
1268
  /**
1377
- * Image content part for OpenAI-compatible chat completion messages.
1269
+ * (Optional) The log probabilities for the tokens in the message
1378
1270
  */
1379
- interface OpenAIChatCompletionContentPartImageParam {
1380
- /**
1381
- * Image URL specification and processing details
1382
- */
1383
- image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1384
- /**
1385
- * Must be "image_url" to identify this as image content
1386
- */
1387
- type: 'image_url';
1271
+ content?: Array<Logprobs.Content>;
1272
+ /**
1273
+ * (Optional) The log probabilities for the tokens in the message
1274
+ */
1275
+ refusal?: Array<Logprobs.Refusal>;
1276
+ }
1277
+ namespace Logprobs {
1278
+ /**
1279
+ * The log probability for a token from an OpenAI-compatible chat completion
1280
+ * response.
1281
+ */
1282
+ interface Content {
1283
+ token: string;
1284
+ logprob: number;
1285
+ top_logprobs: Array<Content.TopLogprob>;
1286
+ bytes?: Array<number>;
1388
1287
  }
1389
- namespace OpenAIChatCompletionContentPartImageParam {
1288
+ namespace Content {
1390
1289
  /**
1391
- * Image URL specification and processing details
1290
+ * The top log probability for a token from an OpenAI-compatible chat completion
1291
+ * response.
1392
1292
  */
1393
- interface ImageURL {
1394
- /**
1395
- * URL of the image to include in the message
1396
- */
1397
- url: string;
1398
- /**
1399
- * (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
1400
- */
1401
- detail?: string;
1293
+ interface TopLogprob {
1294
+ token: string;
1295
+ logprob: number;
1296
+ bytes?: Array<number>;
1402
1297
  }
1403
1298
  }
1404
- interface OpenAIFile {
1405
- file: OpenAIFile.File;
1406
- type: 'file';
1299
+ /**
1300
+ * The log probability for a token from an OpenAI-compatible chat completion
1301
+ * response.
1302
+ */
1303
+ interface Refusal {
1304
+ token: string;
1305
+ logprob: number;
1306
+ top_logprobs: Array<Refusal.TopLogprob>;
1307
+ bytes?: Array<number>;
1407
1308
  }
1408
- namespace OpenAIFile {
1409
- interface File {
1410
- file_data?: string;
1411
- file_id?: string;
1412
- filename?: string;
1309
+ namespace Refusal {
1310
+ /**
1311
+ * The top log probability for a token from an OpenAI-compatible chat completion
1312
+ * response.
1313
+ */
1314
+ interface TopLogprob {
1315
+ token: string;
1316
+ logprob: number;
1317
+ bytes?: Array<number>;
1413
1318
  }
1414
1319
  }
1415
1320
  }
1321
+ }
1322
+ /**
1323
+ * A message from the user in an OpenAI-compatible chat completion request.
1324
+ */
1325
+ interface OpenAIUserMessageParam {
1416
1326
  /**
1417
- * A system message providing instructions or context to the model.
1327
+ * The content of the message, which can include text and other media
1418
1328
  */
1419
- interface OpenAISystemMessageParam {
1329
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParam.OpenAIFile>;
1330
+ /**
1331
+ * Must be "user" to identify this as a user message
1332
+ */
1333
+ role: 'user';
1334
+ /**
1335
+ * (Optional) The name of the user message participant.
1336
+ */
1337
+ name?: string;
1338
+ }
1339
+ namespace OpenAIUserMessageParam {
1340
+ /**
1341
+ * Text content part for OpenAI-compatible chat completion messages.
1342
+ */
1343
+ interface OpenAIChatCompletionContentPartTextParam {
1420
1344
  /**
1421
- * The content of the "system prompt". If multiple system messages are provided,
1422
- * they are concatenated. The underlying Llama Stack code may also add other system
1423
- * messages (for example, for formatting tool definitions).
1345
+ * The text content of the message
1424
1346
  */
1425
- content: string | Array<OpenAISystemMessageParam.UnionMember1>;
1347
+ text: string;
1426
1348
  /**
1427
- * Must be "system" to identify this as a system message
1349
+ * Must be "text" to identify this as text content
1428
1350
  */
1429
- role: 'system';
1351
+ type: 'text';
1352
+ }
1353
+ /**
1354
+ * Image content part for OpenAI-compatible chat completion messages.
1355
+ */
1356
+ interface OpenAIChatCompletionContentPartImageParam {
1430
1357
  /**
1431
- * (Optional) The name of the system message participant.
1358
+ * Image URL specification and processing details
1432
1359
  */
1433
- name?: string;
1360
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1361
+ /**
1362
+ * Must be "image_url" to identify this as image content
1363
+ */
1364
+ type: 'image_url';
1434
1365
  }
1435
- namespace OpenAISystemMessageParam {
1366
+ namespace OpenAIChatCompletionContentPartImageParam {
1436
1367
  /**
1437
- * Text content part for OpenAI-compatible chat completion messages.
1368
+ * Image URL specification and processing details
1438
1369
  */
1439
- interface UnionMember1 {
1370
+ interface ImageURL {
1440
1371
  /**
1441
- * The text content of the message
1372
+ * URL of the image to include in the message
1442
1373
  */
1443
- text: string;
1374
+ url: string;
1444
1375
  /**
1445
- * Must be "text" to identify this as text content
1376
+ * (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
1446
1377
  */
1447
- type: 'text';
1378
+ detail?: string;
1379
+ }
1380
+ }
1381
+ interface OpenAIFile {
1382
+ file: OpenAIFile.File;
1383
+ type: 'file';
1384
+ }
1385
+ namespace OpenAIFile {
1386
+ interface File {
1387
+ file_data?: string;
1388
+ file_id?: string;
1389
+ filename?: string;
1448
1390
  }
1449
1391
  }
1392
+ }
1393
+ /**
1394
+ * A system message providing instructions or context to the model.
1395
+ */
1396
+ interface OpenAISystemMessageParam {
1450
1397
  /**
1451
- * A message containing the model's (assistant) response in an OpenAI-compatible
1452
- * chat completion request.
1398
+ * The content of the "system prompt". If multiple system messages are provided,
1399
+ * they are concatenated. The underlying Llama Stack code may also add other system
1400
+ * messages (for example, for formatting tool definitions).
1453
1401
  */
1454
- interface OpenAIAssistantMessageParam {
1455
- /**
1456
- * Must be "assistant" to identify this as the model's response
1457
- */
1458
- role: 'assistant';
1459
- /**
1460
- * The content of the model's response
1461
- */
1462
- content?: string | Array<OpenAIAssistantMessageParam.UnionMember1>;
1402
+ content: string | Array<OpenAISystemMessageParam.UnionMember1>;
1403
+ /**
1404
+ * Must be "system" to identify this as a system message
1405
+ */
1406
+ role: 'system';
1407
+ /**
1408
+ * (Optional) The name of the system message participant.
1409
+ */
1410
+ name?: string;
1411
+ }
1412
+ namespace OpenAISystemMessageParam {
1413
+ /**
1414
+ * Text content part for OpenAI-compatible chat completion messages.
1415
+ */
1416
+ interface UnionMember1 {
1463
1417
  /**
1464
- * (Optional) The name of the assistant message participant.
1418
+ * The text content of the message
1465
1419
  */
1466
- name?: string;
1420
+ text: string;
1467
1421
  /**
1468
- * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
1422
+ * Must be "text" to identify this as text content
1469
1423
  */
1470
- tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
1424
+ type: 'text';
1471
1425
  }
1472
- namespace OpenAIAssistantMessageParam {
1426
+ }
1427
+ /**
1428
+ * A message containing the model's (assistant) response in an OpenAI-compatible
1429
+ * chat completion request.
1430
+ */
1431
+ interface OpenAIAssistantMessageParam {
1432
+ /**
1433
+ * Must be "assistant" to identify this as the model's response
1434
+ */
1435
+ role: 'assistant';
1436
+ /**
1437
+ * The content of the model's response
1438
+ */
1439
+ content?: string | Array<OpenAIAssistantMessageParam.UnionMember1>;
1440
+ /**
1441
+ * (Optional) The name of the assistant message participant.
1442
+ */
1443
+ name?: string;
1444
+ /**
1445
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
1446
+ */
1447
+ tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
1448
+ }
1449
+ namespace OpenAIAssistantMessageParam {
1450
+ /**
1451
+ * Text content part for OpenAI-compatible chat completion messages.
1452
+ */
1453
+ interface UnionMember1 {
1473
1454
  /**
1474
- * Text content part for OpenAI-compatible chat completion messages.
1455
+ * The text content of the message
1475
1456
  */
1476
- interface UnionMember1 {
1477
- /**
1478
- * The text content of the message
1479
- */
1480
- text: string;
1481
- /**
1482
- * Must be "text" to identify this as text content
1483
- */
1484
- type: 'text';
1485
- }
1457
+ text: string;
1486
1458
  /**
1487
- * Tool call specification for OpenAI-compatible chat completion responses.
1459
+ * Must be "text" to identify this as text content
1488
1460
  */
1489
- interface ToolCall {
1490
- /**
1491
- * Must be "function" to identify this as a function call
1492
- */
1493
- type: 'function';
1494
- /**
1495
- * (Optional) Unique identifier for the tool call
1496
- */
1497
- id?: string;
1498
- /**
1499
- * (Optional) Function call details
1500
- */
1501
- function?: ToolCall.Function;
1502
- /**
1503
- * (Optional) Index of the tool call in the list
1504
- */
1505
- index?: number;
1506
- }
1507
- namespace ToolCall {
1508
- /**
1509
- * (Optional) Function call details
1510
- */
1511
- interface Function {
1512
- /**
1513
- * (Optional) Arguments to pass to the function as a JSON string
1514
- */
1515
- arguments?: string;
1516
- /**
1517
- * (Optional) Name of the function to call
1518
- */
1519
- name?: string;
1520
- }
1521
- }
1461
+ type: 'text';
1522
1462
  }
1523
1463
  /**
1524
- * A message representing the result of a tool invocation in an OpenAI-compatible
1525
- * chat completion request.
1464
+ * Tool call specification for OpenAI-compatible chat completion responses.
1526
1465
  */
1527
- interface OpenAIToolMessageParam {
1466
+ interface ToolCall {
1528
1467
  /**
1529
- * The response content from the tool
1468
+ * Must be "function" to identify this as a function call
1530
1469
  */
1531
- content: string | Array<OpenAIToolMessageParam.UnionMember1>;
1470
+ type: 'function';
1532
1471
  /**
1533
- * Must be "tool" to identify this as a tool response
1472
+ * (Optional) Unique identifier for the tool call
1534
1473
  */
1535
- role: 'tool';
1474
+ id?: string;
1536
1475
  /**
1537
- * Unique identifier for the tool call this response is for
1476
+ * (Optional) Function call details
1538
1477
  */
1539
- tool_call_id: string;
1478
+ function?: ToolCall.Function;
1479
+ /**
1480
+ * (Optional) Index of the tool call in the list
1481
+ */
1482
+ index?: number;
1540
1483
  }
1541
- namespace OpenAIToolMessageParam {
1484
+ namespace ToolCall {
1542
1485
  /**
1543
- * Text content part for OpenAI-compatible chat completion messages.
1486
+ * (Optional) Function call details
1544
1487
  */
1545
- interface UnionMember1 {
1488
+ interface Function {
1546
1489
  /**
1547
- * The text content of the message
1490
+ * (Optional) Arguments to pass to the function as a JSON string
1548
1491
  */
1549
- text: string;
1492
+ arguments?: string;
1550
1493
  /**
1551
- * Must be "text" to identify this as text content
1494
+ * (Optional) Name of the function to call
1552
1495
  */
1553
- type: 'text';
1496
+ name?: string;
1554
1497
  }
1555
1498
  }
1499
+ }
1500
+ /**
1501
+ * A message representing the result of a tool invocation in an OpenAI-compatible
1502
+ * chat completion request.
1503
+ */
1504
+ interface OpenAIToolMessageParam {
1556
1505
  /**
1557
- * A message from the developer in an OpenAI-compatible chat completion request.
1506
+ * The response content from the tool
1558
1507
  */
1559
- interface OpenAIDeveloperMessageParam {
1508
+ content: string | Array<OpenAIToolMessageParam.UnionMember1>;
1509
+ /**
1510
+ * Must be "tool" to identify this as a tool response
1511
+ */
1512
+ role: 'tool';
1513
+ /**
1514
+ * Unique identifier for the tool call this response is for
1515
+ */
1516
+ tool_call_id: string;
1517
+ }
1518
+ namespace OpenAIToolMessageParam {
1519
+ /**
1520
+ * Text content part for OpenAI-compatible chat completion messages.
1521
+ */
1522
+ interface UnionMember1 {
1560
1523
  /**
1561
- * The content of the developer message
1524
+ * The text content of the message
1562
1525
  */
1563
- content: string | Array<OpenAIDeveloperMessageParam.UnionMember1>;
1526
+ text: string;
1564
1527
  /**
1565
- * Must be "developer" to identify this as a developer message
1528
+ * Must be "text" to identify this as text content
1566
1529
  */
1567
- role: 'developer';
1530
+ type: 'text';
1531
+ }
1532
+ }
1533
+ /**
1534
+ * A message from the developer in an OpenAI-compatible chat completion request.
1535
+ */
1536
+ interface OpenAIDeveloperMessageParam {
1537
+ /**
1538
+ * The content of the developer message
1539
+ */
1540
+ content: string | Array<OpenAIDeveloperMessageParam.UnionMember1>;
1541
+ /**
1542
+ * Must be "developer" to identify this as a developer message
1543
+ */
1544
+ role: 'developer';
1545
+ /**
1546
+ * (Optional) The name of the developer message participant.
1547
+ */
1548
+ name?: string;
1549
+ }
1550
+ namespace OpenAIDeveloperMessageParam {
1551
+ /**
1552
+ * Text content part for OpenAI-compatible chat completion messages.
1553
+ */
1554
+ interface UnionMember1 {
1568
1555
  /**
1569
- * (Optional) The name of the developer message participant.
1556
+ * The text content of the message
1570
1557
  */
1571
- name?: string;
1572
- }
1573
- namespace OpenAIDeveloperMessageParam {
1558
+ text: string;
1574
1559
  /**
1575
- * Text content part for OpenAI-compatible chat completion messages.
1560
+ * Must be "text" to identify this as text content
1576
1561
  */
1577
- interface UnionMember1 {
1578
- /**
1579
- * The text content of the message
1580
- */
1581
- text: string;
1582
- /**
1583
- * Must be "text" to identify this as text content
1584
- */
1585
- type: 'text';
1586
- }
1562
+ type: 'text';
1587
1563
  }
1588
1564
  }
1589
1565
  }
@@ -2010,15 +1986,7 @@ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsB
2010
1986
  */
2011
1987
  stream: true;
2012
1988
  }
2013
- export interface CompletionListParams {
2014
- /**
2015
- * The ID of the last chat completion to return.
2016
- */
2017
- after?: string;
2018
- /**
2019
- * The maximum number of chat completions to return.
2020
- */
2021
- limit?: number;
1989
+ export interface CompletionListParams extends OpenAICursorPageParams {
2022
1990
  /**
2023
1991
  * The model to filter by.
2024
1992
  */
@@ -2029,6 +1997,6 @@ export interface CompletionListParams {
2029
1997
  order?: 'asc' | 'desc';
2030
1998
  }
2031
1999
  export declare namespace Completions {
2032
- export { type CompletionCreateResponse as CompletionCreateResponse, type CompletionRetrieveResponse as CompletionRetrieveResponse, type CompletionListResponse as CompletionListResponse, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, type CompletionListParams as CompletionListParams, };
2000
+ export { type CompletionCreateResponse as CompletionCreateResponse, type CompletionRetrieveResponse as CompletionRetrieveResponse, type CompletionListResponse as CompletionListResponse, CompletionListResponsesOpenAICursorPage as CompletionListResponsesOpenAICursorPage, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, type CompletionListParams as CompletionListParams, };
2033
2001
  }
2034
2002
  //# sourceMappingURL=completions.d.ts.map