Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Sep 27, 2024
2 parents 8b800f0 + ca6a5dc commit 24c201a
Show file tree
Hide file tree
Showing 116 changed files with 2,727 additions and 2,544 deletions.
30 changes: 30 additions & 0 deletions .github/scripts/deployDomainVercel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# Check if an argument is provided
if [ $# -eq 0 ]; then
echo "Error: Please provide a version string as an argument."
exit 1
fi

inputString=$1

# Check if VERCEL_TOKEN is set
if [ -z "$VERCEL_TOKEN" ]; then
echo "Error: VERCEL_TOKEN is not set."
exit 1
fi

# save stdout and stderr to files
vercel deploy --prebuilt --token="$VERCEL_TOKEN" >deployment-url.txt 2>error.txt

# check the exit code
code=$?
if [ $code -eq 0 ]; then
# Set the deploymentUrl using the input string
deploymentUrl="${inputString}.api.js.langchain.com"
vercel alias $(cat deployment-url.txt) $deploymentUrl --token="$VERCEL_TOKEN" --scope="langchain"
else
# Handle the error
errorMessage=$(cat error.txt)
echo "There was an error: $errorMessage"
fi
23 changes: 19 additions & 4 deletions .github/workflows/deploy-api-refs-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy API Refs Prod
on:
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI
push:
branches: ["main"]
branches: ["main", "v0.2"]

# If another push to the same PR or branch happens while this workflow is still running,
# cancel the earlier run in favor of the next run.
Expand Down Expand Up @@ -34,6 +34,21 @@ jobs:
- name: Build All Projects
run: yarn turbo:command build --filter=!examples --filter=!api_refs --filter=!core_docs --filter=!create-langchain-integration
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
run: |
if [ ${{ github.ref }} = 'refs/heads/main' ]; then
vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
else
vercel build --token=${{ secrets.VERCEL_TOKEN }}
fi
- name: Deploy to Vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: |
if [ ${{ github.ref }} = 'refs/heads/main' ]; then
vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
elif [ ${{ github.ref }} = 'refs/heads/v0.2' ]; then
.github/scripts/deployDomainVercel.sh v02
else
echo "Error: Deployment is only allowed for 'main' or 'v0.2' branches."
exit 1
fi
4 changes: 4 additions & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
**/node_modules/
.next/
**/.next/
28 changes: 14 additions & 14 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"imports": {
"langchain/": "npm:/langchain/",
"langchain/": "npm:/langchain@0.3.2/",
"@langchain/anthropic": "npm:@langchain/anthropic@0.3.0",
"@langchain/cloudflare": "npm:@langchain/cloudflare@0.1.0",
"@langchain/community/": "npm:/@langchain/community@0.3.0/",
"@langchain/openai": "npm:@langchain/openai@0.3.0",
"@langchain/cohere": "npm:@langchain/cohere@0.3.0",
"@langchain/textsplitters": "npm:@langchain/textsplitters@0.1.0",
"@langchain/google-vertexai-web": "npm:@langchain/google-vertexai-web@0.1.0",
"@langchain/mistralai": "npm:@langchain/mistralai@0.1.0",
"@langchain/core/": "npm:/@langchain/core@0.3.1/",
"@langchain/pinecone": "npm:@langchain/pinecone@0.1.0",
"@langchain/google-common": "npm:@langchain/google-common@0.1.0",
"@langchain/langgraph": "npm:/@langchain/langgraph@0.2.3",
"@langchain/langgraph/": "npm:/@langchain/langgraph@0.2.3/",
"@faker-js/faker": "npm:@faker-js/faker",
"@langchain/anthropic": "npm:@langchain/anthropic",
"@langchain/cloudflare": "npm:@langchain/cloudflare",
"@langchain/community/": "npm:/@langchain/community@0.2.2/",
"@langchain/openai": "npm:@langchain/openai",
"@langchain/cohere": "npm:@langchain/cohere",
"@langchain/textsplitters": "npm:@langchain/textsplitters",
"@langchain/google-vertexai-web": "npm:@langchain/google-vertexai-web",
"@langchain/mistralai": "npm:@langchain/mistralai",
"@langchain/core/": "npm:/@langchain/core@0.2.16/",
"@langchain/pinecone": "npm:@langchain/pinecone",
"@langchain/google-common": "npm:@langchain/google-common",
"@langchain/langgraph": "npm:/@langchain/langgraph@0.0.21",
"@langchain/langgraph/": "npm:/@langchain/langgraph@0.0.21/",
"@microsoft/fetch-event-source": "npm:@microsoft/fetch-event-source",
"@pinecone-database/pinecone": "npm:@pinecone-database/pinecone",
"cheerio": "npm:cheerio",
Expand Down
2 changes: 1 addition & 1 deletion docs/core_docs/docs/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ const tools = toolkit.getTools()

By themselves, language models can't take actions - they just output text.
A big use case for LangChain is creating **agents**.
Agents are systems that use an LLM as a reasoning enginer to determine which actions to take and what the inputs to those actions should be.
Agents are systems that use an LLM as a reasoning engineer to determine which actions to take and what the inputs to those actions should be.
The results of those actions can then be fed back into the agent and it determine whether more actions are needed, or whether it is okay to finish.

[LangGraph](https://github.com/langchain-ai/langgraphjs) is an extension of LangChain specifically aimed at creating highly controllable and customizable agents.
Expand Down
Loading

0 comments on commit 24c201a

Please sign in to comment.