Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config and docs update for deploying #26

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Once your cluster has been created you should see a few sections on the page. Th

Next, click "API Keys" and save the API key in the environment variable `WEAVIATE_API_KEY`.

The final Weaviate environment variable is "WEAVIATE_INDEX_NAME". This is the name of the index you want to use. You can name it whatever you want, but for this example, we'll use "langchain".
The final Weaviate environment variable is "WEAVIATE_INDEX_NAME". This is the name of the index you want to use. You can name it whatever you want, it must be capitalized for the Weaviate internal schema, for this example, we'll use "Langchain".

After this your vector store will be setup. We can now move onto the record manager.

Expand All @@ -42,7 +42,7 @@ This will open a dropdown. From there select "Project".

On the next screen, search for "chat-langchainjs" (if you did not modify the repo name when forking). Once shown, click "Import".

Here you should *only* modify the "Environment Variables" section. You should add the following environment variables:
Here you should **only** modify the "Environment Variables" section. You should add the following environment variables:

> If you have not setup LangSmith, head to the [LangSmith](./LANGSMITH.md) doc for instructions.

Expand All @@ -52,9 +52,10 @@ LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
LANGCHAIN_API_KEY=YOUR_API_KEY
LANGCHAIN_PROJECT=YOUR_PROJECT

NEXT_PUBLIC_VERCEL_URL=YOUR_VERCEL_DOMAIN_PUBLIC_URL
WEAVIATE_API_KEY=YOUR_API_KEY
WEAVIATE_URL=YOUR_WEAVIATE_URL
WEAVIATE_INDEX_NAME=langchain
WEAVIATE_INDEX_NAME=Langchain
FORCE_UPDATE=true
RECORD_MANAGER_DB_URL=YOUR_DB_URL
OPENAI_API_KEY=YOUR_OPENAI_KEY
Expand All @@ -76,7 +77,7 @@ When configuring, click "Add secret" and add the following secrets:
OPENAI_API_KEY=
RECORD_MANAGER_DB_URL=
WEAVIATE_API_KEY=
WEAVIATE_INDEX_NAME=langchain
WEAVIATE_INDEX_NAME=Langchain
WEAVIATE_URL=
```

Expand Down
17 changes: 10 additions & 7 deletions frontend/.env.example
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# ------------------LangSmith tracing------------------
LANGCHAIN_TRACING_V2=true
LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
LANGCHAIN_API_KEY=
LANGCHAIN_PROJECT=
LANGCHAIN_API_KEY=YOUR_API_KEY
LANGCHAIN_PROJECT=YOUR_PROJECT
# -----------------------------------------------------

WEAVIATE_API_KEY=
WEAVIATE_URL=
WEAVIATE_INDEX_NAME=
NEXT_PUBLIC_VERCEL_URL=YOUR_VERCEL_DOMAIN_PUBLIC_URL

FIREWORKS_API_KEY=
WEAVIATE_API_KEY=YOUR_API_KEY
WEAVIATE_URL=YOUR_WEAVIATE_URL
WEAVIATE_INDEX_NAME=Langchain

FIREWORKS_API_KEY=YOUR_FIREWORKS_API_KEY
RECORD_MANAGER_DB_URL=YOUR_DB_URL
OPENAI_API_KEY=YOUR_OPENAI_KEY

OPENAI_API_KEY=
4 changes: 2 additions & 2 deletions frontend/app/utils/constants.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const apiBasePath = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
const apiBasePath = process.env.NEXT_PUBLIC_VERCEL_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: `http://localhost:3000`;
export const apiBaseUrl = `${apiBasePath}/api`;
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"inputs": ["**/src/**"]
}
}
}
}