Skip to content

Commit 2e218b2

Browse files
committed
allow llm calls from Deno
1 parent dbd1592 commit 2e218b2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llm/src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ type PartialCallback = (text: string) => void;
55
let llmApiUrl = typeof globalThis.location !== "undefined"
66
? globalThis.location.protocol + "//" + globalThis.location.host +
77
"/api/ai/llm"
8+
: Deno?.env.get("TOOLSHED_API_URL")
9+
? new URL("/api/ai/llm", Deno.env.get("TOOLSHED_API_URL")!).toString()
810
: "//api/ai/llm";
911

1012
export const setLLMUrl = (toolshedUrl: string) => {

0 commit comments

Comments
 (0)