Commit Graph

52 Commits

Author SHA1 Message Date
ccurme
4792f0575c (new docs): fix links (#21345) 2024-05-06 17:52:54 -04:00
Chester Curme
50e34f1bdf add link 2024-05-06 16:35:38 -04:00
ccurme
c44287ebfe (new docs): update sidebars (#21329) 2024-05-06 16:09:40 -04:00
ccurme
58e91eaca9 (new docs): update SQL how-tos (#21325) 2024-05-06 13:41:15 -04:00
Harrison Chase
716a8c8ad7 cr 2024-05-06 08:13:36 -07:00
ccurme
93544443ea (new docs): fix build and resolve feedback (#21253) 2024-05-03 11:17:48 -04:00
ccurme
e894559fed (new docs) update links (#21228)
Done with a script + manual review: 

1. Map unique file names to new paths;
2. Where those file names have old links, update them.
2024-05-03 10:28:12 -04:00
ccurme
507fa9439b (new docs): format (#21226) 2024-05-02 17:46:58 -04:00
ccurme
b8bd9edb2f (new docs): update extraction how-to guides (#21195) 2024-05-02 16:27:16 -04:00
ccurme
8987aaf8b7 (new docs): fix (#21217)
Builds broken by
a70459f54f
2024-05-02 16:00:33 -04:00
Harrison Chase
a70459f54f cr 2024-05-01 16:24:47 -07:00
Harrison Chase
0522e9def3 cr 2024-05-01 16:07:43 -07:00
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
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
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
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
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
eec4d5802e cr 2024-04-24 07:59:00 -07:00
Harrison Chase
95f7055478 cr 2024-04-23 18:06:12 -07:00
Harrison Chase
efa3e67bd7 cr 2024-04-23 17:32:51 -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
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
jacoblee93
c6e4459c33 Add passthrough guide 2024-04-19 17:43:41 -07:00
jacoblee93
f53b395c19 More runnable how tos 2024-04-19 17:31:02 -07:00
jacoblee93
9bd75f371b Update some LCEL how-tos 2024-04-19 16:41:06 -07:00
jacoblee93
e021f4727b Add streaming, structured output, and tool calling how tos 2024-04-19 15:10:30 -07:00
jacoblee93
88ba5e1366 Add prereq component, update guide 2024-04-19 11:09:04 -07:00
jacoblee93
803b2b37e2 Merge, update structured output guide 2024-04-18 20:41:49 -07:00
Harrison Chase
2a99bc6971 cr 2024-04-18 18:39:19 -07:00
Harrison Chase
3bfb519fe6 cr 2024-04-18 18:26:14 -07:00
Harrison Chase
92eb0cdd25 cr 2024-04-18 18:23:28 -07:00
Harrison Chase
4111112386 cr 2024-04-18 18:20:31 -07:00