Skip to content

Commit 0836131

Browse files
author
Theodore Li
committed
Fix type error
1 parent 09a1b5c commit 0836131

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

apps/sim/providers/cerebras/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ export const cerebrasProvider: ProviderConfig = {
314314
duration: duration,
315315
})
316316
let resultContent: any
317-
if (result.success) {
317+
if (result.success && result.output) {
318318
toolResults.push(result.output)
319319
resultContent = result.output
320320
} else {

apps/sim/providers/deepseek/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ export const deepseekProvider: ProviderConfig = {
326326
})
327327

328328
let resultContent: any
329-
if (result.success) {
329+
if (result.success && result.output) {
330330
toolResults.push(result.output)
331331
resultContent = result.output
332332
} else {

apps/sim/providers/groq/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ export const groqProvider: ProviderConfig = {
304304
})
305305

306306
let resultContent: any
307-
if (result.success) {
307+
if (result.success && result.output) {
308308
toolResults.push(result.output)
309309
resultContent = result.output
310310
} else {

apps/sim/providers/mistral/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ export const mistralProvider: ProviderConfig = {
367367
})
368368

369369
let resultContent: any
370-
if (result.success) {
371-
toolResults.push(result.output)
370+
if (result.success && result.output) {
371+
toolResults.push(result.output)
372372
resultContent = result.output
373373
} else {
374374
resultContent = {

apps/sim/providers/ollama/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,8 @@ export const ollamaProvider: ProviderConfig = {
377377
})
378378

379379
let resultContent: any
380-
if (result.success) {
381-
toolResults.push(result.output)
380+
if (result.success && result.output) {
381+
toolResults.push(result.output)
382382
resultContent = result.output
383383
} else {
384384
resultContent = {

apps/sim/providers/openai/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ export async function executeResponsesProviderRequest(
513513
})
514514

515515
let resultContent: Record<string, unknown>
516-
if (result.success) {
516+
if (result.success && result.output) {
517517
toolResults.push(result.output)
518518
resultContent = result.output as Record<string, unknown>
519519
} else {

apps/sim/providers/vllm/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ export const vllmProvider: ProviderConfig = {
429429
})
430430

431431
let resultContent: any
432-
if (result.success) {
433-
toolResults.push(result.output)
432+
if (result.success && result.output) {
433+
toolResults.push(result.output)
434434
resultContent = result.output
435435
} else {
436436
resultContent = {

apps/sim/providers/xai/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ export const xAIProvider: ProviderConfig = {
332332
duration: duration,
333333
})
334334
let resultContent: any
335-
if (result.success) {
335+
if (result.success && result.output) {
336336
toolResults.push(result.output)
337337
resultContent = result.output
338338
} else {

0 commit comments

Comments
 (0)