From 15f4153fda82e3d00d033424c9230250e1480d8b Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 29 Mar 2024 18:24:30 -0700 Subject: [PATCH] fix: openai isseu --- src/routes/(app)/+page.svelte | 2 +- src/routes/(app)/c/[id]/+page.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index aeb0ce9a5..b2d2cbd4d 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -588,7 +588,7 @@ max_tokens: $settings?.options?.num_predict ?? undefined, docs: docs.length > 0 ? docs : undefined }, - model.source.toLowerCase() === 'litellm' + model?.source?.toLowerCase() === 'litellm' ? `${LITELLM_API_BASE_URL}/v1` : `${OPENAI_API_BASE_URL}` ); diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 7245137d1..1a304f6d2 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -602,7 +602,7 @@ max_tokens: $settings?.options?.num_predict ?? undefined, docs: docs.length > 0 ? docs : undefined }, - model.source.toLowerCase() === 'litellm' + model?.source?.toLowerCase() === 'litellm' ? `${LITELLM_API_BASE_URL}/v1` : `${OPENAI_API_BASE_URL}` );