veryfront 0.1.568 → 0.1.569
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/esm/deno.js +1 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts.map +1 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.js +1 -23
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
package/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAI7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,KAAK,OAAO,EAGb,MAAM,aAAa,CAAC;AA0ErB;;GAEG;AACH,wBAAgB,qCAAqC,CAAC,GAAG,EAAE,OAAO,GAAG,4BAA4B,CA2FhG;
|
|
1
|
+
{"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAI7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,KAAK,OAAO,EAGb,MAAM,aAAa,CAAC;AA0ErB;;GAEG;AACH,wBAAgB,qCAAqC,CAAC,GAAG,EAAE,OAAO,GAAG,4BAA4B,CA2FhG;AAgBD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAYhC"}
|
|
@@ -153,17 +153,6 @@ export function convertToTextGenerationRuntimeMessage(msg) {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
function convertToolResultPart(part) {
|
|
157
|
-
return {
|
|
158
|
-
role: "tool",
|
|
159
|
-
content: [{
|
|
160
|
-
type: "tool-result",
|
|
161
|
-
toolCallId: part.toolCallId,
|
|
162
|
-
toolName: part.toolName ?? "unknown",
|
|
163
|
-
output: { type: "json", value: part.result },
|
|
164
|
-
}],
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
156
|
function hasProviderSendableAssistantContent(message) {
|
|
168
157
|
if (message.role !== "assistant")
|
|
169
158
|
return true;
|
|
@@ -185,18 +174,7 @@ export function convertToTextGenerationRuntimeMessages(messages) {
|
|
|
185
174
|
if (!hasProviderSendableAssistantContent(message)) {
|
|
186
175
|
continue;
|
|
187
176
|
}
|
|
188
|
-
|
|
189
|
-
textGenerationRuntimeMessages.push(convertToTextGenerationRuntimeMessage(message));
|
|
190
|
-
continue;
|
|
191
|
-
}
|
|
192
|
-
const toolResultParts = message.parts.filter((part) => part.type === "tool-result");
|
|
193
|
-
if (toolResultParts.length === 0) {
|
|
194
|
-
textGenerationRuntimeMessages.push(convertToTextGenerationRuntimeMessage(message));
|
|
195
|
-
continue;
|
|
196
|
-
}
|
|
197
|
-
for (const toolResultPart of toolResultParts) {
|
|
198
|
-
textGenerationRuntimeMessages.push(convertToolResultPart(toolResultPart));
|
|
199
|
-
}
|
|
177
|
+
textGenerationRuntimeMessages.push(convertToTextGenerationRuntimeMessage(message));
|
|
200
178
|
}
|
|
201
179
|
return textGenerationRuntimeMessages;
|
|
202
180
|
}
|