llama-stack-client 0.2.18 → 0.2.19-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/index.d.mts +12 -11
- package/index.d.ts +12 -11
- package/index.d.ts.map +1 -1
- package/index.js +3 -0
- package/index.js.map +1 -1
- package/index.mjs +6 -3
- package/index.mjs.map +1 -1
- package/package.json +4 -1
- package/pagination.d.ts +19 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.js +42 -1
- package/pagination.js.map +1 -1
- package/pagination.mjs +40 -0
- package/pagination.mjs.map +1 -1
- package/resources/chat/chat.d.ts +2 -2
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js +1 -0
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs +2 -1
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +414 -446
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js +7 -2
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs +5 -1
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/chat/index.d.ts +1 -1
- package/resources/chat/index.d.ts.map +1 -1
- package/resources/chat/index.js +2 -1
- package/resources/chat/index.js.map +1 -1
- package/resources/chat/index.mjs +1 -1
- package/resources/chat/index.mjs.map +1 -1
- package/resources/files.d.ts +10 -19
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +7 -2
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +5 -1
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -3
- package/resources/index.mjs.map +1 -1
- package/resources/inference.d.ts +2 -38
- package/resources/inference.d.ts.map +1 -1
- package/resources/moderations.d.ts +1 -5
- package/resources/moderations.d.ts.map +1 -1
- package/resources/responses/index.d.ts +1 -1
- package/resources/responses/index.d.ts.map +1 -1
- package/resources/responses/index.js +2 -1
- package/resources/responses/index.js.map +1 -1
- package/resources/responses/index.mjs +1 -1
- package/resources/responses/index.mjs.map +1 -1
- package/resources/responses/input-items.d.ts +30 -3
- package/resources/responses/input-items.d.ts.map +1 -1
- package/resources/responses/responses.d.ts +604 -470
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +10 -2
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +8 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/scoring-functions.d.ts +12 -3
- package/resources/scoring-functions.d.ts.map +1 -1
- package/resources/scoring-functions.js.map +1 -1
- package/resources/scoring-functions.mjs.map +1 -1
- package/resources/shared.d.ts +19 -28
- package/resources/shared.d.ts.map +1 -1
- package/resources/telemetry.d.ts +98 -1
- package/resources/telemetry.d.ts.map +1 -1
- package/resources/telemetry.js +6 -0
- package/resources/telemetry.js.map +1 -1
- package/resources/telemetry.mjs +6 -0
- package/resources/telemetry.mjs.map +1 -1
- package/resources/vector-stores/files.d.ts +7 -39
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +7 -2
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +5 -1
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/index.d.ts +2 -2
- package/resources/vector-stores/index.d.ts.map +1 -1
- package/resources/vector-stores/index.js +3 -1
- package/resources/vector-stores/index.js.map +1 -1
- package/resources/vector-stores/index.mjs +2 -2
- package/resources/vector-stores/index.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +9 -16
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js +11 -2
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs +10 -2
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/src/index.ts +27 -3
- package/src/pagination.ts +70 -0
- package/src/resources/chat/chat.ts +3 -0
- package/src/resources/chat/completions.ts +483 -510
- package/src/resources/chat/index.ts +1 -0
- package/src/resources/files.ts +14 -22
- package/src/resources/index.ts +5 -0
- package/src/resources/inference.ts +2 -44
- package/src/resources/moderations.ts +1 -5
- package/src/resources/responses/index.ts +1 -0
- package/src/resources/responses/input-items.ts +33 -1
- package/src/resources/responses/responses.ts +700 -532
- package/src/resources/scoring-functions.ts +34 -3
- package/src/resources/shared.ts +22 -43
- package/src/resources/telemetry.ts +128 -0
- package/src/resources/vector-stores/files.ts +18 -48
- package/src/resources/vector-stores/index.ts +2 -1
- package/src/resources/vector-stores/vector-stores.ts +16 -19
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- 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.
|
|
23
|
-
list(options?: Core.RequestOptions): Core.
|
|
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
|
-
*
|
|
977
|
+
* The ID of the chat completion
|
|
978
978
|
*/
|
|
979
|
-
|
|
979
|
+
id: string;
|
|
980
980
|
/**
|
|
981
|
-
*
|
|
981
|
+
* List of choices
|
|
982
982
|
*/
|
|
983
|
-
|
|
983
|
+
choices: Array<CompletionListResponse.Choice>;
|
|
984
984
|
/**
|
|
985
|
-
*
|
|
985
|
+
* The Unix timestamp in seconds when the chat completion was created
|
|
986
986
|
*/
|
|
987
|
-
|
|
987
|
+
created: number;
|
|
988
|
+
input_messages: Array<CompletionListResponse.OpenAIUserMessageParam | CompletionListResponse.OpenAISystemMessageParam | CompletionListResponse.OpenAIAssistantMessageParam | CompletionListResponse.OpenAIToolMessageParam | CompletionListResponse.OpenAIDeveloperMessageParam>;
|
|
988
989
|
/**
|
|
989
|
-
*
|
|
990
|
+
* The model that was used to generate the chat completion
|
|
990
991
|
*/
|
|
991
|
-
|
|
992
|
+
model: string;
|
|
992
993
|
/**
|
|
993
|
-
*
|
|
994
|
+
* The object type, which will be "chat.completion"
|
|
994
995
|
*/
|
|
995
|
-
object: '
|
|
996
|
+
object: 'chat.completion';
|
|
996
997
|
}
|
|
997
998
|
export declare namespace CompletionListResponse {
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
id: string;
|
|
999
|
+
/**
|
|
1000
|
+
* A choice from an OpenAI-compatible chat completion response.
|
|
1001
|
+
*/
|
|
1002
|
+
interface Choice {
|
|
1003
1003
|
/**
|
|
1004
|
-
*
|
|
1004
|
+
* The reason the model stopped generating
|
|
1005
1005
|
*/
|
|
1006
|
-
|
|
1006
|
+
finish_reason: string;
|
|
1007
1007
|
/**
|
|
1008
|
-
* The
|
|
1008
|
+
* The index of the choice
|
|
1009
1009
|
*/
|
|
1010
|
-
|
|
1011
|
-
input_messages: Array<Data.OpenAIUserMessageParam | Data.OpenAISystemMessageParam | Data.OpenAIAssistantMessageParam | Data.OpenAIToolMessageParam | Data.OpenAIDeveloperMessageParam>;
|
|
1010
|
+
index: number;
|
|
1012
1011
|
/**
|
|
1013
|
-
* The
|
|
1012
|
+
* The message from the model
|
|
1014
1013
|
*/
|
|
1015
|
-
|
|
1014
|
+
message: Choice.OpenAIUserMessageParam | Choice.OpenAISystemMessageParam | Choice.OpenAIAssistantMessageParam | Choice.OpenAIToolMessageParam | Choice.OpenAIDeveloperMessageParam;
|
|
1016
1015
|
/**
|
|
1017
|
-
* The
|
|
1016
|
+
* (Optional) The log probabilities for the tokens in the message
|
|
1018
1017
|
*/
|
|
1019
|
-
|
|
1018
|
+
logprobs?: Choice.Logprobs;
|
|
1020
1019
|
}
|
|
1021
|
-
namespace
|
|
1020
|
+
namespace Choice {
|
|
1022
1021
|
/**
|
|
1023
|
-
* A
|
|
1022
|
+
* A message from the user in an OpenAI-compatible chat completion request.
|
|
1024
1023
|
*/
|
|
1025
|
-
interface
|
|
1026
|
-
/**
|
|
1027
|
-
* The reason the model stopped generating
|
|
1028
|
-
*/
|
|
1029
|
-
finish_reason: string;
|
|
1024
|
+
interface OpenAIUserMessageParam {
|
|
1030
1025
|
/**
|
|
1031
|
-
* The
|
|
1026
|
+
* The content of the message, which can include text and other media
|
|
1032
1027
|
*/
|
|
1033
|
-
|
|
1028
|
+
content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParam.OpenAIFile>;
|
|
1034
1029
|
/**
|
|
1035
|
-
*
|
|
1030
|
+
* Must be "user" to identify this as a user message
|
|
1036
1031
|
*/
|
|
1037
|
-
|
|
1032
|
+
role: 'user';
|
|
1038
1033
|
/**
|
|
1039
|
-
* (Optional) The
|
|
1034
|
+
* (Optional) The name of the user message participant.
|
|
1040
1035
|
*/
|
|
1041
|
-
|
|
1036
|
+
name?: string;
|
|
1042
1037
|
}
|
|
1043
|
-
namespace
|
|
1038
|
+
namespace OpenAIUserMessageParam {
|
|
1044
1039
|
/**
|
|
1045
|
-
*
|
|
1040
|
+
* Text content part for OpenAI-compatible chat completion messages.
|
|
1046
1041
|
*/
|
|
1047
|
-
interface
|
|
1042
|
+
interface OpenAIChatCompletionContentPartTextParam {
|
|
1048
1043
|
/**
|
|
1049
|
-
* The content of the message
|
|
1044
|
+
* The text content of the message
|
|
1050
1045
|
*/
|
|
1051
|
-
|
|
1046
|
+
text: string;
|
|
1052
1047
|
/**
|
|
1053
|
-
* Must be "
|
|
1048
|
+
* Must be "text" to identify this as text content
|
|
1054
1049
|
*/
|
|
1055
|
-
|
|
1050
|
+
type: 'text';
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* Image content part for OpenAI-compatible chat completion messages.
|
|
1054
|
+
*/
|
|
1055
|
+
interface OpenAIChatCompletionContentPartImageParam {
|
|
1056
1056
|
/**
|
|
1057
|
-
*
|
|
1057
|
+
* Image URL specification and processing details
|
|
1058
1058
|
*/
|
|
1059
|
-
|
|
1060
|
-
}
|
|
1061
|
-
namespace OpenAIUserMessageParam {
|
|
1059
|
+
image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
|
|
1062
1060
|
/**
|
|
1063
|
-
*
|
|
1061
|
+
* Must be "image_url" to identify this as image content
|
|
1064
1062
|
*/
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
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
|
|
1067
|
+
* Image URL specification and processing details
|
|
1077
1068
|
*/
|
|
1078
|
-
interface
|
|
1079
|
-
/**
|
|
1080
|
-
* Image URL specification and processing details
|
|
1081
|
-
*/
|
|
1082
|
-
image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
|
|
1069
|
+
interface ImageURL {
|
|
1083
1070
|
/**
|
|
1084
|
-
*
|
|
1071
|
+
* URL of the image to include in the message
|
|
1085
1072
|
*/
|
|
1086
|
-
|
|
1087
|
-
}
|
|
1088
|
-
namespace OpenAIChatCompletionContentPartImageParam {
|
|
1073
|
+
url: string;
|
|
1089
1074
|
/**
|
|
1090
|
-
*
|
|
1075
|
+
* (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
|
|
1091
1076
|
*/
|
|
1092
|
-
|
|
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
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
1119
|
+
text: string;
|
|
1125
1120
|
/**
|
|
1126
|
-
* Must be "
|
|
1121
|
+
* Must be "text" to identify this as text content
|
|
1127
1122
|
*/
|
|
1128
|
-
|
|
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
|
-
*
|
|
1154
|
+
* The text content of the message
|
|
1131
1155
|
*/
|
|
1132
|
-
|
|
1133
|
-
}
|
|
1134
|
-
namespace OpenAISystemMessageParam {
|
|
1156
|
+
text: string;
|
|
1135
1157
|
/**
|
|
1136
|
-
*
|
|
1158
|
+
* Must be "text" to identify this as text content
|
|
1137
1159
|
*/
|
|
1138
|
-
|
|
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
|
-
*
|
|
1151
|
-
* chat completion request.
|
|
1163
|
+
* Tool call specification for OpenAI-compatible chat completion responses.
|
|
1152
1164
|
*/
|
|
1153
|
-
interface
|
|
1165
|
+
interface ToolCall {
|
|
1154
1166
|
/**
|
|
1155
|
-
* Must be "
|
|
1167
|
+
* Must be "function" to identify this as a function call
|
|
1156
1168
|
*/
|
|
1157
|
-
|
|
1169
|
+
type: 'function';
|
|
1158
1170
|
/**
|
|
1159
|
-
*
|
|
1171
|
+
* (Optional) Unique identifier for the tool call
|
|
1160
1172
|
*/
|
|
1161
|
-
|
|
1173
|
+
id?: string;
|
|
1162
1174
|
/**
|
|
1163
|
-
* (Optional)
|
|
1175
|
+
* (Optional) Function call details
|
|
1164
1176
|
*/
|
|
1165
|
-
|
|
1177
|
+
function?: ToolCall.Function;
|
|
1166
1178
|
/**
|
|
1167
|
-
*
|
|
1179
|
+
* (Optional) Index of the tool call in the list
|
|
1168
1180
|
*/
|
|
1169
|
-
|
|
1181
|
+
index?: number;
|
|
1170
1182
|
}
|
|
1171
|
-
namespace
|
|
1183
|
+
namespace ToolCall {
|
|
1172
1184
|
/**
|
|
1173
|
-
*
|
|
1185
|
+
* (Optional) Function call details
|
|
1174
1186
|
*/
|
|
1175
|
-
interface
|
|
1187
|
+
interface Function {
|
|
1176
1188
|
/**
|
|
1177
|
-
*
|
|
1189
|
+
* (Optional) Arguments to pass to the function as a JSON string
|
|
1178
1190
|
*/
|
|
1179
|
-
|
|
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)
|
|
1193
|
+
* (Optional) Name of the function to call
|
|
1209
1194
|
*/
|
|
1210
|
-
|
|
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
|
-
*
|
|
1224
|
-
* chat completion request.
|
|
1205
|
+
* The response content from the tool
|
|
1225
1206
|
*/
|
|
1226
|
-
|
|
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
|
-
*
|
|
1209
|
+
* Must be "tool" to identify this as a tool response
|
|
1257
1210
|
*/
|
|
1258
|
-
|
|
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
|
-
*
|
|
1213
|
+
* Unique identifier for the tool call this response is for
|
|
1289
1214
|
*/
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
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
|
|
1303
|
-
* response.
|
|
1223
|
+
* The text content of the message
|
|
1304
1224
|
*/
|
|
1305
|
-
|
|
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
|
-
*
|
|
1324
|
-
* response.
|
|
1227
|
+
* Must be "text" to identify this as text content
|
|
1325
1228
|
*/
|
|
1326
|
-
|
|
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
|
|
1233
|
+
* A message from the developer in an OpenAI-compatible chat completion request.
|
|
1347
1234
|
*/
|
|
1348
|
-
interface
|
|
1235
|
+
interface OpenAIDeveloperMessageParam {
|
|
1349
1236
|
/**
|
|
1350
|
-
* The content of the message
|
|
1237
|
+
* The content of the developer message
|
|
1351
1238
|
*/
|
|
1352
|
-
content: string | Array<
|
|
1239
|
+
content: string | Array<OpenAIDeveloperMessageParam.UnionMember1>;
|
|
1353
1240
|
/**
|
|
1354
|
-
* Must be "
|
|
1241
|
+
* Must be "developer" to identify this as a developer message
|
|
1355
1242
|
*/
|
|
1356
|
-
role: '
|
|
1243
|
+
role: 'developer';
|
|
1357
1244
|
/**
|
|
1358
|
-
* (Optional) The name of the
|
|
1245
|
+
* (Optional) The name of the developer message participant.
|
|
1359
1246
|
*/
|
|
1360
1247
|
name?: string;
|
|
1361
1248
|
}
|
|
1362
|
-
namespace
|
|
1249
|
+
namespace OpenAIDeveloperMessageParam {
|
|
1363
1250
|
/**
|
|
1364
1251
|
* Text content part for OpenAI-compatible chat completion messages.
|
|
1365
1252
|
*/
|
|
1366
|
-
interface
|
|
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
|
-
*
|
|
1269
|
+
* (Optional) The log probabilities for the tokens in the message
|
|
1378
1270
|
*/
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
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
|
|
1288
|
+
namespace Content {
|
|
1390
1289
|
/**
|
|
1391
|
-
*
|
|
1290
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1291
|
+
* response.
|
|
1392
1292
|
*/
|
|
1393
|
-
interface
|
|
1394
|
-
|
|
1395
|
-
|
|
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
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
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
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
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
|
-
*
|
|
1327
|
+
* The content of the message, which can include text and other media
|
|
1418
1328
|
*/
|
|
1419
|
-
|
|
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
|
|
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
|
-
|
|
1347
|
+
text: string;
|
|
1426
1348
|
/**
|
|
1427
|
-
* Must be "
|
|
1349
|
+
* Must be "text" to identify this as text content
|
|
1428
1350
|
*/
|
|
1429
|
-
|
|
1351
|
+
type: 'text';
|
|
1352
|
+
}
|
|
1353
|
+
/**
|
|
1354
|
+
* Image content part for OpenAI-compatible chat completion messages.
|
|
1355
|
+
*/
|
|
1356
|
+
interface OpenAIChatCompletionContentPartImageParam {
|
|
1430
1357
|
/**
|
|
1431
|
-
*
|
|
1358
|
+
* Image URL specification and processing details
|
|
1432
1359
|
*/
|
|
1433
|
-
|
|
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
|
|
1366
|
+
namespace OpenAIChatCompletionContentPartImageParam {
|
|
1436
1367
|
/**
|
|
1437
|
-
*
|
|
1368
|
+
* Image URL specification and processing details
|
|
1438
1369
|
*/
|
|
1439
|
-
interface
|
|
1370
|
+
interface ImageURL {
|
|
1440
1371
|
/**
|
|
1441
|
-
*
|
|
1372
|
+
* URL of the image to include in the message
|
|
1442
1373
|
*/
|
|
1443
|
-
|
|
1374
|
+
url: string;
|
|
1444
1375
|
/**
|
|
1445
|
-
*
|
|
1376
|
+
* (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
|
|
1446
1377
|
*/
|
|
1447
|
-
|
|
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
|
-
*
|
|
1452
|
-
*
|
|
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
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
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
|
-
*
|
|
1418
|
+
* The text content of the message
|
|
1465
1419
|
*/
|
|
1466
|
-
|
|
1420
|
+
text: string;
|
|
1467
1421
|
/**
|
|
1468
|
-
*
|
|
1422
|
+
* Must be "text" to identify this as text content
|
|
1469
1423
|
*/
|
|
1470
|
-
|
|
1424
|
+
type: 'text';
|
|
1471
1425
|
}
|
|
1472
|
-
|
|
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
|
-
*
|
|
1455
|
+
* The text content of the message
|
|
1475
1456
|
*/
|
|
1476
|
-
|
|
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
|
-
*
|
|
1459
|
+
* Must be "text" to identify this as text content
|
|
1488
1460
|
*/
|
|
1489
|
-
|
|
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
|
-
*
|
|
1525
|
-
* chat completion request.
|
|
1464
|
+
* Tool call specification for OpenAI-compatible chat completion responses.
|
|
1526
1465
|
*/
|
|
1527
|
-
interface
|
|
1466
|
+
interface ToolCall {
|
|
1528
1467
|
/**
|
|
1529
|
-
*
|
|
1468
|
+
* Must be "function" to identify this as a function call
|
|
1530
1469
|
*/
|
|
1531
|
-
|
|
1470
|
+
type: 'function';
|
|
1532
1471
|
/**
|
|
1533
|
-
*
|
|
1472
|
+
* (Optional) Unique identifier for the tool call
|
|
1534
1473
|
*/
|
|
1535
|
-
|
|
1474
|
+
id?: string;
|
|
1536
1475
|
/**
|
|
1537
|
-
*
|
|
1476
|
+
* (Optional) Function call details
|
|
1538
1477
|
*/
|
|
1539
|
-
|
|
1478
|
+
function?: ToolCall.Function;
|
|
1479
|
+
/**
|
|
1480
|
+
* (Optional) Index of the tool call in the list
|
|
1481
|
+
*/
|
|
1482
|
+
index?: number;
|
|
1540
1483
|
}
|
|
1541
|
-
namespace
|
|
1484
|
+
namespace ToolCall {
|
|
1542
1485
|
/**
|
|
1543
|
-
*
|
|
1486
|
+
* (Optional) Function call details
|
|
1544
1487
|
*/
|
|
1545
|
-
interface
|
|
1488
|
+
interface Function {
|
|
1546
1489
|
/**
|
|
1547
|
-
*
|
|
1490
|
+
* (Optional) Arguments to pass to the function as a JSON string
|
|
1548
1491
|
*/
|
|
1549
|
-
|
|
1492
|
+
arguments?: string;
|
|
1550
1493
|
/**
|
|
1551
|
-
*
|
|
1494
|
+
* (Optional) Name of the function to call
|
|
1552
1495
|
*/
|
|
1553
|
-
|
|
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
|
-
*
|
|
1506
|
+
* The response content from the tool
|
|
1558
1507
|
*/
|
|
1559
|
-
|
|
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
|
|
1524
|
+
* The text content of the message
|
|
1562
1525
|
*/
|
|
1563
|
-
|
|
1526
|
+
text: string;
|
|
1564
1527
|
/**
|
|
1565
|
-
* Must be "
|
|
1528
|
+
* Must be "text" to identify this as text content
|
|
1566
1529
|
*/
|
|
1567
|
-
|
|
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
|
-
*
|
|
1556
|
+
* The text content of the message
|
|
1570
1557
|
*/
|
|
1571
|
-
|
|
1572
|
-
}
|
|
1573
|
-
namespace OpenAIDeveloperMessageParam {
|
|
1558
|
+
text: string;
|
|
1574
1559
|
/**
|
|
1575
|
-
*
|
|
1560
|
+
* Must be "text" to identify this as text content
|
|
1576
1561
|
*/
|
|
1577
|
-
|
|
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
|