mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
chore: cleanup transform code a tad
This commit is contained in:
parent
626fa1462b
commit
578239e0d0
@ -26,9 +26,7 @@ export namespace ProviderTransform {
|
||||
msgs = msgs.map((msg) => {
|
||||
if (msg.providerOptions) {
|
||||
for (const options of Object.values(msg.providerOptions)) {
|
||||
if (options && typeof options === "object") {
|
||||
delete options["itemId"]
|
||||
}
|
||||
delete options["itemId"]
|
||||
}
|
||||
}
|
||||
if (!Array.isArray(msg.content)) {
|
||||
@ -37,9 +35,7 @@ export namespace ProviderTransform {
|
||||
const content = msg.content.map((part) => {
|
||||
if (part.providerOptions) {
|
||||
for (const options of Object.values(part.providerOptions)) {
|
||||
if (options && typeof options === "object") {
|
||||
delete options["itemId"]
|
||||
}
|
||||
delete options["itemId"]
|
||||
}
|
||||
}
|
||||
return part
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user