This commit is contained in:
bracesproul
2025-04-10 13:48:02 -07:00
parent 94b2aae9e4
commit 0bceb3f0c7
2 changed files with 3 additions and 2 deletions
+2
View File
@@ -23,12 +23,14 @@ cp .env.example .env
When running the Chat UI, it will prompt you to enter your deployment URL, assistant ID, and LangSmith API key. If you want to hardcode these values, and bypass the initial setup form, you can set the following environment variables inside `apps/web/.env`:
If using Vite:
```bash
VITE_API_URL=http://localhost:2024
VITE_ASSISTANT_ID=agent
```
If using Next.js:
```bash
NEXT_PUBLIC_API_URL=http://localhost:2024
NEXT_PUBLIC_ASSISTANT_ID=agent
+1 -2
View File
@@ -129,8 +129,7 @@ export const StreamProvider: React.FC<{ children: ReactNode }> = ({
}) => {
// Get environment variables
const envApiUrl: string | undefined = import.meta.env.VITE_API_URL;
const envAssistantId: string | undefined =
import.meta.env.VITE_ASSISTANT_ID;
const envAssistantId: string | undefined = import.meta.env.VITE_ASSISTANT_ID;
// Use URL params with env var fallbacks
const [apiUrl, setApiUrl] = useQueryState("apiUrl", {