Skip to content

Commit 3840151

Browse files
committed
Converting docs
1 parent c149d04 commit 3840151

File tree

14 files changed

+623
-133
lines changed

14 files changed

+623
-133
lines changed

.github/workflows/jekyll.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Started with: https://github.com/actions/starter-workflows/blob/main/pages/jekyll.yml .
2+
# Have to use a custom Jekyll workflow as the default GitHub Jekyll workflow does not whitelist the
3+
# "jekyll-tabs" plugin that lets us show code tabs in the documentation.
4+
5+
name: Deploy Jekyll site to Pages
6+
7+
on:
8+
push:
9+
branches: ["main"]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# Allow one concurrent deployment
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: true
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
- name: Setup Ruby and install Gemfile bundles
32+
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
33+
with:
34+
ruby-version: '3.1' # Not needed with a .ruby-version file
35+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
36+
working-directory: ./docs
37+
cache-version: 0 # Increment this number if you need to re-download cached gems
38+
- name: Setup Pages
39+
id: pages
40+
uses: actions/configure-pages@v5
41+
- name: Build with Jekyll
42+
working-directory: ./docs
43+
# Outputs to the './_site' directory by default
44+
run: bundle exec jekyll build --verbose --baseurl "${{ steps.pages.outputs.base_path }}"
45+
env:
46+
JEKYLL_ENV: production
47+
- name: Upload artifact
48+
# Automatically uploads an artifact from the './_site' directory by default
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: "./docs/_site"
52+
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
runs-on: ubuntu-latest
58+
needs: build
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v4

README.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,4 @@ This repository contains a set of examples for demonstrating common AI use cases
44
MarkLogic. These examples are intended to serve as a starting point for your own applications; you are encouraged to
55
copy and modify the code as needed.
66

7-
The examples in this repository depend on the
8-
[Azure OpenAI Service](https://azure.microsoft.com/en-us/products/ai-services/openai-service). They can be easily
9-
tailored to work with any LLM supported by the LLM framework used by each example. Note though that if you wish to
10-
execute these examples as-is, you will need an Azure OpenAI account and API key.
11-
12-
## Setup
13-
14-
If you would like to try out the example programs, please [follow these instructions](setup/README.md).
15-
16-
## RAG Examples
17-
18-
MarkLogic excels at supporting RAG, or ["Retrieval-Augmented Generation"](https://python.langchain.com/docs/tutorials/rag/),
19-
via its schema-agnostic nature as well as it's powerful and flexible indexing. This repository contains the following
20-
examples of RAG with MarkLogic:
21-
22-
- The [rag-langchain-python](rag-langchain-python/README.md) project demonstrates RAG with Python, langchain, and MarkLogic.
23-
- The [rag-langchain-java](rag-langchain-java/README.md) project demonstrates RAG with Java, langchain4j, and MarkLogic.
24-
- The [rag-langchain-js](rag-langchain-js/README.md) project demonstrates RAG with JavaScript, langchain.js, and MarkLogic.
25-
26-
## Splitting / Chunking Examples
27-
28-
A RAG approach typically benefits from sending multiple smaller segments or "chunks" of text to an LLM. Please
29-
see [this guide on splitting documents](splitting-langchain-java/README.md) for more information on how to split
30-
your documents and why you may wish to do so.
31-
32-
## Embedding examples
33-
34-
To utilize the vector queries shown in the RAG Examples listed above, embeddings - vector representations of text -
35-
should be added to your documents in MarkLogic.
36-
See [this guide on adding embeddings](embedding-langchain-java/README.md) for more information.
7+
For more information, please see [the user guide](TODO This will be changed once the docs are being published).

docs/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
_site
2+
.sass-cache
3+
.jekyll-cache
4+
.jekyll-metadata
5+
vendor

docs/Gemfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
source "https://rubygems.org"
2+
# Hello! This is where you manage which Jekyll version is used to run.
3+
# When you want to use a different version, change it below, save the
4+
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
5+
#
6+
# bundle exec jekyll serve
7+
#
8+
# This will help ensure the proper Jekyll version is running.
9+
# Happy Jekylling!
10+
11+
gem "github-pages", "~> 229", group: :jekyll_plugins
12+
13+
gem "webrick"
14+
15+
# If you have any plugins, put them here!
16+
group :jekyll_plugins do
17+
gem "jekyll-tabs"
18+
end
19+
20+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
21+
# and associated library.
22+
platforms :mingw, :x64_mingw, :mswin, :jruby do
23+
gem "tzinfo", ">= 1", "< 3"
24+
gem "tzinfo-data"
25+
end
26+
27+
# Performance-booster for watching directories on Windows
28+
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
29+
30+
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
31+
# do not have a Java counterpart.
32+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

0 commit comments

Comments
 (0)