mirror of
https://github.com/langchain-ai/create-agent-chat-app.git
synced 2026-07-01 21:24:02 -04:00
cr
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user