Skip to content

Commit 85ff477

Browse files
Merge pull request #1 from YellowGangneng/working_with_mac
branch merge
2 parents ad4e742 + 0265f75 commit 85ff477

File tree

267 files changed

+137196
-4817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+137196
-4817
lines changed

.env_sample

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
OPENAI_API_KEY=sk-5K9kI4dia...
2-
HUGGINGFACEHUB_API_TOKEN=hf_oEHVwJ...
32
LANGCHAIN_TRACING_V2=false
43
LANGCHAIN_ENDPOINT=https://api.smith.langchain.com
54
LANGCHAIN_API_KEY=ls__69f274d55...
65
LANGCHAIN_PROJECT=LANGCHAIN_PROJECT
7-
TAVILY_API_KEY=tvly-mGxBGvzbH...
8-
GOOGLE_API_KEY=AIzaSyCSttRIEqEf1_X...
9-
PINECONE_API_KEY=549b555d-c388-4d...
106
ANTHROPIC_API_KEY=sk-ant-api0...
7+
GOOGLE_API_KEY=AIzaSyCSttRIEqEf1_X...
118
UPSTAGE_API_KEY=up_oZ4HjE...
129
COHERE_API_KEY=63HBVVS...
13-
UPSTAGE_API_KEY=up_oZ4HjE...
10+
TAVILY_API_KEY=tvly-mGxBGvzbH...
11+
HUGGINGFACEHUB_API_TOKEN=hf_oEHVwJ...
12+
MONGODB_ATLAS_CLUSTER_URI=mongodb+srv://...
13+
PINECONE_API_KEY=549b555d-c388-4d...
14+
NEO4J_URI=neo4j://localhost:7687...
15+
NEO4J_USERNAME=neo4j...
16+
NEO4J_PASSWORD=password...
17+
ES_URL=https://my-elasticsearch-projec...
18+
ES_API_KEY=bk9X...
1419
LLAMA_CLOUD_API_KEY=llx-...
1520
JINA_API_KEY=jina...
1621
DEEPL_API_KEY=deepl-api-key...

.github/.gitkeep

Whitespace-only changes.

.github/ISSUE_TEMPLATE/Proofread.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ body:
3434
required: false
3535
- label: 🖋️ **Formatting** - Issues with Markdown formatting.
3636
required: false
37-
- label: No issues found
37+
- label: Other Issues
3838
required: false
3939

4040
- type: checkboxes

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
🖥️ OS: Win/Mac/Linux
1313
✅ Checklist
1414
- [ ] **Template**: Tutorials follows the required template.
15-
- [ ] **Table of Contents(TOC) Links**: All Table of Contents links work. ((Yes/No)
15+
- [ ] **Table of Contents(TOC) Links**: All Table of Contents links work. (Yes/No)
1616
- [ ] **Image**: Image filenames follow guidelines.
17-
- [ ] **Imports*: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
17+
- [ ] **Imports**: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
1818
- [ ] **Code Execution**: Code runs without errors.
1919
- Comments: {Write freely, 한국어 기술 가능}
2020
```

.github/workflows/pr-age.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
- cron: '30 0,3,9,15 * * *'
66
pull_request:
77
types: [opened, synchronize, reopened]
8-
# pull_request_review:
9-
# types: [submitted]
108
workflow_dispatch:
119

1210
permissions:
@@ -17,20 +15,20 @@ permissions:
1715
jobs:
1816
check-pr-age:
1917
runs-on: ubuntu-latest
18+
if: github.repository == 'LangChain-OpenTutorial/LangChain-OpenTutorial' # 원본 레포에서만 실행
2019
steps:
2120
- name: Check if 24 hours have passed since PR creation
2221
uses: actions/github-script@v6
2322
with:
2423
github-token: ${{ secrets.GITHUB_TOKEN }}
2524
script: |
26-
// check 24-hours
25+
// Function to check PR age
2726
async function checkPrAge(pr) {
2827
const createdAt = new Date(pr.created_at);
2928
const now = new Date();
3029
const diffHours = (now - createdAt) / (1000 * 60 * 60);
31-
30+
3231
if (diffHours >= 24) {
33-
// success
3432
console.log(`PR #${pr.number} is older than 24 hours. Merge allowed.`);
3533
await github.rest.checks.create({
3634
owner: context.repo.owner,
@@ -45,7 +43,6 @@ jobs:
4543
},
4644
});
4745
} else {
48-
// fail
4946
const hoursLeft = (24 - diffHours).toFixed(2);
5047
console.log(`PR #${pr.number} is not yet older than 24 hours. Left ${hoursLeft} hours.`);
5148
await github.rest.checks.create({
@@ -63,7 +60,7 @@ jobs:
6360
}
6461
}
6562
66-
// know whether sceduled event
63+
// Check if it's a scheduled event
6764
const isScheduled = !context.payload.pull_request;
6865
6966
if (isScheduled) {
@@ -72,17 +69,15 @@ jobs:
7269
repo: context.repo.repo,
7370
state: 'open',
7471
per_page: 100,
75-
});
72+
});
7673
for (const pr of pullRequests) {
7774
await checkPrAge(pr);
7875
}
79-
8076
} else {
8177
const pr = await github.rest.pulls.get({
8278
owner: context.repo.owner,
8379
repo: context.repo.repo,
8480
pull_number: context.payload.pull_request.number,
8581
});
86-
8782
await checkPrAge(pr.data);
8883
}

.github/workflows/restrict-commits.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

01-Basic/01-Getting-Started-Windows.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"# Getting Started on Windows\n",
99
"\n",
1010
"- Author: [Wooseok-Jeong](https://github.com/jeong-wooseok)\n",
11-
"- Design: [Teddy](https://github.com/teddylee777)\n",
12-
"- Peer Review: [Yun Eun](https://github.com/yuneun92), [r14minji](https://github.com/r14minji)\n",
11+
"- Peer Review: [Yun Eun](https://github.com/yuneun92), [MinJi Kang](https://www.linkedin.com/in/minji-kang-995b32230/)\n",
1312
"- This is a part of [LangChain Open Tutorial](https://github.com/LangChain-OpenTutorial/LangChain-OpenTutorial)\n",
1413
"\n",
1514
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/LangChain-OpenTutorial/LangChain-OpenTutorial/blob/main/01-Basic/01-Getting-Started-Windows.ipynb) [![Open in GitHub](https://img.shields.io/badge/Open%20in%20GitHub-181717?style=flat-square&logo=github&logoColor=white)](https://github.com/LangChain-OpenTutorial/LangChain-OpenTutorial/blob/main/01-Basic/01-Getting-Started-Windows.ipynb)\n",
@@ -53,6 +52,7 @@
5352
"metadata": {},
5453
"source": [
5554
"Confirm options during installation and proceed\n",
55+
"\n",
5656
"![](./assets/01-follow-the-installation-video-windows-02.png)"
5757
]
5858
},
@@ -62,6 +62,7 @@
6262
"metadata": {},
6363
"source": [
6464
"Click the Next button for all the rest to proceed with the installation.\n",
65+
"\n",
6566
"![](./assets/01-follow-the-installation-video-windows-03.png)"
6667
]
6768
},
@@ -76,6 +77,7 @@
7677
"```Powershell\n",
7778
"git\n",
7879
"```\n",
80+
"\n",
7981
"![](./assets/01-follow-the-installation-video-windows-04.png)\n"
8082
]
8183
},
@@ -86,7 +88,7 @@
8688
"source": [
8789
"- Apply PowerShell Policy \n",
8890
"\n",
89-
"First, **run **Windows PowerShell** as an \"administrator.\"</p> <p><br>\n",
91+
"First, run **Windows PowerShell** as an \"administrator.\"</p> <p><br>\n",
9092
"\n",
9193
"Enter the following command to apply the policy\n",
9294
"```Powershell\n",
@@ -133,7 +135,8 @@
133135
"```powershell\n",
134136
"pyenv\n",
135137
"```\n",
136-
"![](./assets/01-follow-the-installation-video-windows-05.png)\n"
138+
" \n",
139+
"![](./assets/01-follow-the-installation-video-windows-05.png )\n"
137140
]
138141
},
139142
{
@@ -226,6 +229,7 @@
226229
"Install the downloaded Visual Studio Code (copy it to the Applications folder)\n",
227230
"\n",
228231
"Click 'install' of Jupyter on left Menu of extensions \n",
232+
"\n",
229233
"![](./assets/01-follow-the-installation-video-windows-06.png)"
230234
]
231235
},
@@ -236,9 +240,11 @@
236240
"source": [
237241
"## Install Jupyter Extension\n",
238242
"Search for \"python\" and install\n",
243+
"\n",
239244
"![](./assets/01-follow-the-installation-video-windows-07.png)\n",
240245
"\n",
241246
"Search for \"jupyter\" and install\n",
247+
"\n",
242248
"![](./assets/01-follow-the-installation-video-windows-08.png)\n",
243249
"\n",
244250
"Turn off and restart Visual Studio Code\n",
@@ -247,12 +253,6 @@
247253
"\n",
248254
"Click python environment - if you don't see the virtual environment you installed, turn off Visual Studio Code and restart it"
249255
]
250-
},
251-
{
252-
"cell_type": "markdown",
253-
"id": "e9c62cb7",
254-
"metadata": {},
255-
"source": []
256256
}
257257
],
258258
"metadata": {

01-Basic/04-LangSmith-Tracking-Setup.ipynb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
"\n",
1616
"## Overview\n",
1717
"\n",
18-
"This tutorial covers how to set up and use LangSmith, a powerful platform for developing, monitoring, and testing LLM applications. \n",
19-
"LangSmith provides comprehensive tracking capabilities that are essential for understanding and optimizing your LLM applications.\n",
18+
"This tutorial covers how to set up and use `LangSmith`, a powerful platform for developing, monitoring, and testing LLM applications. \n",
19+
"`LangSmith` provides comprehensive tracking capabilities that are essential for understanding and optimizing your LLM applications.\n",
2020
"\n",
21-
"LangSmith tracking helps you monitor:\n",
21+
"`LangSmith` tracking helps you monitor:\n",
2222
"\n",
23-
"Token usage and associated costs\n",
23+
"- Token usage and associated costs\n",
2424
"- Execution time and performance metrics\n",
2525
"- Error rates and unexpected behaviors\n",
2626
"- Agent interactions and chain operations\n",
2727
"\n",
28-
"In this tutorial, we'll walk through the process of setting up LangSmith tracking and integrating it with your LangChain applications.\n",
28+
"In this tutorial, we'll walk through the process of setting up `LangSmith` tracking and integrating it with your `LangChain` applications.\n",
2929
"\n",
3030
"### Table of Contents\n",
3131
"\n",
@@ -48,8 +48,8 @@
4848
"source": [
4949
"## Setting up a LangSmith trace\n",
5050
"\n",
51-
"LangSmith is a platform for developing, monitoring, and testing LLM applications. \n",
52-
"If you're starting a project or learning LangChain, LangSmith is a must-have to get set up and running."
51+
"`LangSmith` is a platform for developing, monitoring, and testing LLM applications. \n",
52+
"If you're starting a project or learning `LangChain`, `LangSmith` is a must-have to get set up and running."
5353
]
5454
},
5555
{
@@ -100,7 +100,7 @@
100100
"\n",
101101
"1. Go to https://smith.langchain.com/ and sign up.\n",
102102
"2. After signing up, you will need to verify your email.\n",
103-
"3. Click the left cog (Setting) - centre \"Personal\" - \"Create API Key\" to get an API key.\n",
103+
"3. Click the left cog (Setting) - center \"Personal\" - \"Create API Key\" to get an API key.\n",
104104
"\n",
105105
"![get-api-key](./assets/03-langsmith-tracking-setup-04.png)\n",
106106
"\n"
@@ -110,7 +110,7 @@
110110
"cell_type": "markdown",
111111
"metadata": {},
112112
"source": [
113-
"set environment variables is in `.env`.\n",
113+
"Set environment variables is in the `.env` file.\n",
114114
"\n",
115115
"Copy the contents of `.env_sample` and load it into your `.env` with the key you set.\n"
116116
]
@@ -140,7 +140,7 @@
140140
"cell_type": "markdown",
141141
"metadata": {},
142142
"source": [
143-
"In Description, enter a description that makes sense to you and click the Create API Key button to create it.\n",
143+
"In Description, enter a description that makes sense to you and click the Create API Key button.\n",
144144
"\n",
145145
"![create-api-key](./assets/03-langsmith-tracking-setup-05.png\n",
146146
")\n"
@@ -167,10 +167,10 @@
167167
"\n",
168168
"First, enter the key you received from LangSmith and your project information in the .env file.\n",
169169
"\n",
170-
"- LANGCHAIN_TRACING_V2: Set to \"true\" to start tracking.\n",
171-
"- LANGCHAIN_ENDPOINT: https://api.smith.langchain.com Do not change.\n",
172-
"- LANGCHAIN_API_KEY: Enter the key issued in the previous step.\n",
173-
"- LANGCHAIN_PROJECT: If you enter a project name, all runs will be traced to that project group.\n",
170+
"- `LANGCHAIN_TRACING_V2`: Set to \"true\" to start tracking.\n",
171+
"- `LANGCHAIN_ENDPOINT`: https://api.smith.langchain.com (Do not modify this value).\n",
172+
"- `LANGCHAIN_API_KEY`: Enter the key you received in the previous step.\n",
173+
"- `LANGCHAIN_PROJECT`: Specify a project name to group and trace all runs under that project group.\n",
174174
"\n",
175175
"![setting-api-key](./assets/03-langsmith-tracking-setup-07.png)\n",
176176
"\n"
@@ -184,7 +184,7 @@
184184
"\n",
185185
"Enabling tracking is very simple. All you need to do is set an environment variable.\n",
186186
"\n",
187-
"Copy the contents of .env_sample and load it into your .env with the key you set for Bonnie."
187+
"Copy the contents of `.env_sample` and load it into your `.env` with the key you set"
188188
]
189189
},
190190
{
@@ -223,7 +223,7 @@
223223
"cell_type": "markdown",
224224
"metadata": {},
225225
"source": [
226-
"As long as your traces are enabled and your API key and project name are set correctly, this should be sufficient.\n",
226+
"As long as your traces are enabled and your API key and project name are set correctly, tracking will work properly.\n",
227227
"\n",
228228
"However, if you want to change the project name or change the tracking, you can do so with the code below."
229229
]
@@ -238,7 +238,7 @@
238238
"\n",
239239
"os.environ[\"LANGCHAIN_TRACING_V2\"] = \"true\"\n",
240240
"os.environ[\"LANGCHAIN_ENDPOINT\"] = \"https://api.smith.langchain.com\"\n",
241-
"os.environ[\"LANGCHAIN_PROJECT\"] = \"<LangChain Peoject Name>\"\n",
241+
"os.environ[\"LANGCHAIN_PROJECT\"] = \"<LangChain Project Name>\"\n",
242242
"os.environ[\"LANGCHAIN_API_KEY\"] = \"<LangChain API KEY>\""
243243
]
244244
}
@@ -264,4 +264,4 @@
264264
},
265265
"nbformat": 4,
266266
"nbformat_minor": 2
267-
}
267+
}

0 commit comments

Comments
 (0)