Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix hello world custom ai

Louis Beaumont8a2b8139b9f5
diff --git a/pipes/hello-world-computer-use/components/chat.tsx b/pipes/hello-world-computer-use/components/chat.tsx
index 719928d4d..7e878c578 100644
--- a/pipes/hello-world-computer-use/components/chat.tsx
+++ b/pipes/hello-world-computer-use/components/chat.tsx
@@ -501,15 +501,26 @@ export const Chat = () => {
const model =
preset.provider === "openai"
? createOpenAI({
- baseURL: preset.url,
apiKey: apiKey,
})(preset.model)
: preset.provider === "native-ollama"
? ollama(preset.model)
- : createOpenAI({
+ : preset.provider === "custom"
+ ? createOpenAI({
+ baseURL: preset.url,
+ apiKey: apiKey,
+ })(preset.model)
+ : preset.provider === "screenpipe-cloud"
+ ? createOpenAI({
baseURL: preset.url,
apiKey: apiKey,
- })(preset.model);
+ })(preset.model)
+ : null;
+
+ if (!model) {
+ toast.message("please select a valid provider");
+ return;
+ }
console.log("model", model);
const messages = [