Skip to content

An AI-powered search engine with a generative UI

refactor: Update workflow to use model identifier instead of environment variable

Yoshiki Miura568caa999145
diff --git a/lib/actions/workflow.tsx b/lib/actions/workflow.tsx
index dce30a84..7b57501b 100644
--- a/lib/actions/workflow.tsx
+++ b/lib/actions/workflow.tsx
@@ -63,7 +63,7 @@ export async function workflow(
// Remove the spinner
uiStream.update(null)
- const useOllama = process.env.OLLAMA_MODEL && process.env.OLLAMA_BASE_URL
+ const useOllama = model.startsWith('ollama')
// Select the appropriate researcher function based on the environment variables
const { text, toolResults } = useOllama
? await researcherWithOllama(uiStream, messages, model)