Commit Graph

69 Commits

Author SHA1 Message Date
Harrison Chase
cf866efb78 Merge branch 'harrison/new-docs' of github.com:hwchase17/langchain into harrison/new-docs 2024-05-01 16:07:31 -07:00
Harrison Chase
8e8a03d61b cr 2024-05-01 16:07:24 -07:00
ccurme
c77debf870 (new docs): update rag use-case docs (#21164) 2024-05-01 16:25:14 -04:00
ccurme
6a20856fab (new docs): embedding how-to guides (#21106) 2024-04-30 14:49:06 -04:00
Chester Curme
7f4397c94a format 2024-04-30 12:44:14 -04:00
Chester Curme
7285370328 update tutorial 2024-04-30 12:43:54 -04:00
ccurme
df8a2cdc96 (new docs): update text splitter how-to guides (#21087) 2024-04-30 11:34:42 -04:00
ccurme
c3b7933d98 (new docs): update how-to guides (#21073) 2024-04-30 08:21:09 -04:00
Harrison Chase
86bb3aa45b Merge branch 'harrison/new-docs' of github.com:hwchase17/langchain into harrison/new-docs 2024-04-29 16:29:52 -07:00
Harrison Chase
55dd2ea57d cr 2024-04-29 16:29:47 -07:00
ccurme
392b842a59 (new docs): organize how-to sidebars (#21029)
```python
import json
import re
from pathlib import Path

def parse_markdown_to_sidebar(markdown_content):
    lines = markdown_content.splitlines()
    sidebar = []
    current_category = None
    current_subcategory = None

    for line in lines:
        if line.startswith('### '):
            # Subcategory
            if current_subcategory is not None:
                current_category['items'].append(current_subcategory)
            subcategory_title = line.strip('# ').strip()
            current_subcategory = {
                "type": "category",
                "label": subcategory_title,
                "collapsed": True,
                "items": [],
                "link": {"type": "generated-index"}
            }
        elif line.startswith('## '):
            # Category
            if current_category is not None:
                if current_subcategory is not None:
                    current_category['items'].append(current_subcategory)
                    current_subcategory = None
                sidebar.append(current_category)
            category_title = line.strip('# ').strip()
            current_category = {
                "type": "category",
                "label": category_title,
                "collapsed": True,
                "items": [],
                "link": {"type": "generated-index"}
            }
        elif line.startswith('- ['):
            # Link
            match = re.match(r'- \[(.*?)\]\((.*?)\)', line)
            if match:
                title, link = match.groups()
                link = link.replace('/docs/', '')  # Remove '/docs/' prefix
                if current_subcategory is not None:
                    current_subcategory['items'].append(link)
                elif current_category is not None:
                    current_category['items'].append(link)

    # Add the last category and subcategory if they exist
    if current_subcategory is not None:
        current_category['items'].append(current_subcategory)
    if current_category is not None:
        sidebar.append(current_category)

    return sidebar

def generate_sidebar_json(file_path):
    with open(file_path, 'r') as md_file:
        markdown_content = md_file.read()
    sidebar = parse_markdown_to_sidebar(markdown_content)
    sidebar_json = json.dumps({"items": sidebar}, indent=2)
    return sidebar_json
```
2024-04-29 19:00:06 -04:00
Harrison Chase
e037446ca3 cr 2024-04-29 15:40:00 -07:00
Harrison Chase
8920bcd263 Merge branch 'harrison/new-docs' of github.com:hwchase17/langchain into harrison/new-docs 2024-04-29 15:39:55 -07:00
Harrison Chase
81a7868c57 cr 2024-04-29 15:39:50 -07:00
ccurme
d99a7a6b44 (new docs): update how-to guides (#21039) 2024-04-29 16:27:58 -04:00
Harrison Chase
be73daaa64 cr 2024-04-26 17:57:16 -07:00
ccurme
1dc9232b9a (new docs): updates (#20897) 2024-04-25 13:35:01 -04:00
Harrison Chase
66b2ac62eb cr 2024-04-24 17:07:56 -07:00
Harrison Chase
e9eb1e29c8 cr 2024-04-24 16:34:50 -07:00
Harrison Chase
b0a3e12c8f cr 2024-04-24 14:24:59 -07:00
Harrison Chase
a1e769251c cr 2024-04-24 14:09:21 -07:00
Harrison Chase
c47f4e668b Merge branch 'harrison/new-docs' of github.com:hwchase17/langchain into harrison/new-docs 2024-04-24 13:51:55 -07:00
Harrison Chase
5aa134799c stash 2024-04-24 13:40:02 -07:00
Harrison Chase
f04f012658 stash 2024-04-24 13:24:15 -07:00
ccurme
294e81df5d update tutorials (#20854) 2024-04-24 15:39:11 -04:00
Harrison Chase
0ff7a4054b cr 2024-04-24 11:29:24 -07:00
Harrison Chase
4448825414 cr 2024-04-24 08:19:49 -07:00
Harrison Chase
c6b63c5bf1 cr 2024-04-24 08:18:12 -07:00
Harrison Chase
eec4d5802e cr 2024-04-24 07:59:00 -07:00
Harrison Chase
a915f16ead cr 2024-04-23 21:27:55 -07:00
Harrison Chase
95f7055478 cr 2024-04-23 18:06:12 -07:00
Harrison Chase
a19c9cddc2 cr 2024-04-23 17:35:41 -07:00
Harrison Chase
efa3e67bd7 cr 2024-04-23 17:32:51 -07:00
Harrison Chase
b3997501e1 cr 2024-04-23 15:01:57 -07:00
Harrison Chase
ea83256a22 stash 2024-04-23 13:44:08 -07:00
Harrison Chase
2280fc63a2 cr 2024-04-23 13:02:49 -07:00
jacoblee93
5a78b090ad Update more output parser how to guides 2024-04-22 01:20:42 -07:00
jacoblee93
a6895f7a10 Fix prerequisite link component, add to more guides 2024-04-21 20:27:52 -07:00
jacoblee93
103b275d47 Fix 2024-04-20 22:07:03 -07:00
jacoblee93
1927977fd7 More updates 2024-04-20 21:32:01 -07:00
jacoblee93
f2fc84c4c5 Consolidate multiple chains how-to guide 2024-04-20 20:49:49 -07:00
jacoblee93
8c4b283fe8 Consolidate decorator how to guide 2024-04-20 19:03:21 -07:00
jacoblee93
1385cfa55f Merge branch 'harrison/new-docs' of https://github.com/langchain-ai/langchain into harrison/new-docs 2024-04-20 18:25:17 -07:00
jacoblee93
94c339e3d1 More how tos 2024-04-20 18:25:12 -07:00
Harrison Chase
ddea36514f cr 2024-04-20 16:47:03 -07:00
Harrison Chase
51f1f4b045 cr 2024-04-20 16:18:15 -07:00
Harrison Chase
c6d0993c93 cr 2024-04-20 14:22:29 -07:00
Harrison Chase
1ca2138720 cr 2024-04-20 09:30:16 -07:00
Harrison Chase
ed207b365b cr 2024-04-20 09:20:51 -07:00
jacoblee93
d962d97952 More runnable how-to guides 2024-04-19 18:11:17 -07:00