From ab9ef4b65b96f5c4d8cc91f5348cbe8929882417 Mon Sep 17 00:00:00 2001 From: Ian Eaves Date: Fri, 21 Nov 2025 22:50:04 -0600 Subject: [PATCH] adds auto rebuild for documentation Signed-off-by: Ian Eaves --- .github/workflows/docsite-publish.yml | 71 +++++++++++++++++++++ docsite/docs/commands/ramalama/chat.mdx | 6 ++ docsite/docs/commands/ramalama/pull.mdx | 15 +++++ docsite/docs/commands/ramalama/ramalama.mdx | 3 + docsite/docs/commands/ramalama/run.mdx | 6 ++ docsite/docs/configuration/conf.mdx | 21 +++++- docsite/docusaurus.config.ts | 5 +- docsite/package-lock.json | 30 ++++++++- 8 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/docsite-publish.yml diff --git a/.github/workflows/docsite-publish.yml b/.github/workflows/docsite-publish.yml new file mode 100644 index 00000000..7e7430f5 --- /dev/null +++ b/.github/workflows/docsite-publish.yml @@ -0,0 +1,71 @@ +name: Publish Docsite + +on: + push: + branches: + - main + paths: + - 'docs/**' + - 'docsite/**' + - '.github/workflows/docsite-publish.yml' + workflow_dispatch: + +env: + TARGET_REPO: "containers/ramalama.github.io" + TARGET_BRANCH: "main" + TARGET_DIR: "public/docs" + TARGET_WORKDIR: "ramalama.github.io" + PUBLISH_TOKEN: ${{ secrets.DOCSITE_PUBLISH_TOKEN }} +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout RamaLama + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + cache-dependency-path: docsite/package-lock.json + + - name: Build docsite (install, convert, build) + run: make -C docsite all + + - name: Ensure publish configuration is set + run: | + if [ -z "$TARGET_REPO" ]; then + echo '::error::Set the DOCSITE_TARGET_REPO repository variable (e.g. owner/marketing-site).' + exit 1 + fi + if [ -z "$PUBLISH_TOKEN" ]; then + echo '::error::Add the DOCSITE_PUBLISH_TOKEN secret with a PAT that can push to the marketing site repository.' + exit 1 + fi + + - name: Checkout marketing site repository + uses: actions/checkout@v4 + with: + repository: ${{ env.TARGET_REPO }} + token: ${{ env.PUBLISH_TOKEN }} + path: ${{ env.TARGET_WORKDIR }} + ref: ${{ env.TARGET_BRANCH }} + + - name: Sync built documentation into marketing site + run: | + mkdir -p "${TARGET_WORKDIR}/${TARGET_DIR}" + rsync -a --delete docsite/build/ "${TARGET_WORKDIR}/${TARGET_DIR}/" + + - name: Commit and push updates + run: | + cd "${TARGET_WORKDIR}" + if git status --short "${TARGET_DIR}" | grep .; then + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add "${TARGET_DIR}" + git commit -m "Docs: sync from ${GITHUB_REPOSITORY}@${GITHUB_SHA}" + git push origin "$TARGET_BRANCH" + else + echo "No docsite changes to publish." + fi diff --git a/docsite/docs/commands/ramalama/chat.mdx b/docsite/docs/commands/ramalama/chat.mdx index e0c7c8a9..8b96469c 100644 --- a/docsite/docs/commands/ramalama/chat.mdx +++ b/docsite/docs/commands/ramalama/chat.mdx @@ -47,6 +47,12 @@ Prefix for the user prompt (default: 🦭 > ) #### **--rag**=path A file or directory of files to be loaded and provided as local context in the chat history. +#### **--summarize-after**=*N* +Automatically summarize conversation history after N messages to prevent context growth. +When enabled, ramalama will periodically condense older messages into a summary, +keeping only recent messages and the summary. This prevents the context from growing +indefinitely during long chat sessions. Set to 0 to disable (default: 4). + #### **--url**=URL The host to send requests to (default: http://127.0.0.1:8080) diff --git a/docsite/docs/commands/ramalama/pull.mdx b/docsite/docs/commands/ramalama/pull.mdx index 7eca51b4..62061a9b 100644 --- a/docsite/docs/commands/ramalama/pull.mdx +++ b/docsite/docs/commands/ramalama/pull.mdx @@ -27,6 +27,21 @@ require HTTPS and verify certificates when contacting OCI registries #### **--verify**=*true* verify the model after pull, disable to allow pulling of models with different endianness +## PROXY SUPPORT + +RamaLama supports HTTP, HTTPS, and SOCKS proxies via standard environment variables: + +- **HTTP_PROXY** or **http_proxy**: Proxy for HTTP connections +- **HTTPS_PROXY** or **https_proxy**: Proxy for HTTPS connections +- **NO_PROXY** or **no_proxy**: Comma-separated list of hosts to bypass proxy + +Example proxy URL formats: +- HTTP/HTTPS: `http://proxy.example.com:8080` or `https://proxy.example.com:8443` +- SOCKS4: `socks4://proxy.example.com:1080` +- SOCKS5: `socks5://proxy.example.com:1080` or `socks5h://proxy.example.com:1080` (DNS through proxy) + +SOCKS proxy support requires the PySocks library (`pip install PySocks`). + ## See Also [ramalama(1)](/docs/commands/ramalama/) diff --git a/docsite/docs/commands/ramalama/ramalama.mdx b/docsite/docs/commands/ramalama/ramalama.mdx index 5a21b29a..19ebf040 100644 --- a/docsite/docs/commands/ramalama/ramalama.mdx +++ b/docsite/docs/commands/ramalama/ramalama.mdx @@ -185,6 +185,9 @@ although the recommended way is to use the ramalama.conf file. | ENV Name | Description | | ------------------------- | ------------------------------------------ | +| HTTP_PROXY, http_proxy | proxy URL for HTTP connections | +| HTTPS_PROXY, https_proxy | proxy URL for HTTPS connections | +| NO_PROXY, no_proxy | comma-separated list of hosts to bypass proxy (e.g., localhost,127.0.0.1,.local) | | RAMALAMA_CONFIG | specific configuration file to be used | | RAMALAMA_CONTAINER_ENGINE | container engine (Podman/Docker) to use | | RAMALAMA_FORCE_EMOJI | define whether `ramalama run` uses EMOJI | diff --git a/docsite/docs/commands/ramalama/run.mdx b/docsite/docs/commands/ramalama/run.mdx index f1743dac..76286d3f 100644 --- a/docsite/docs/commands/ramalama/run.mdx +++ b/docsite/docs/commands/ramalama/run.mdx @@ -183,6 +183,12 @@ Specify seed rather than using random seed model interaction #### **--selinux**=*true* Enable SELinux container separation +#### **--summarize-after**=*N* +Automatically summarize conversation history after N messages to prevent context growth. +When enabled, ramalama will periodically condense older messages into a summary, +keeping only recent messages and the summary. This prevents the context from growing +indefinitely during long chat sessions. Set to 0 to disable (default: 4). + #### **--temp**="0.8" Temperature of the response from the AI Model llama.cpp explains this as: diff --git a/docsite/docs/configuration/conf.mdx b/docsite/docs/configuration/conf.mdx index cd5dbc16..81d49b0d 100644 --- a/docsite/docs/configuration/conf.mdx +++ b/docsite/docs/configuration/conf.mdx @@ -182,6 +182,13 @@ SELinux container separation enforcement Store AI Models in the specified directory +**summarize_after**=4 + +Automatically summarize conversation history after N messages to prevent context growth. +When enabled, ramalama will periodically condense older messages into a summary, +keeping only recent messages and the summary. This prevents the context from growing +indefinitely during long chat sessions. Set to 0 to disable (default: 4). + **temp**="0.8" Temperature of the response from the AI Model llama.cpp explains this as: @@ -205,4 +212,16 @@ The default -1, uses the default of the underlying implementation Specify the default transport to be used for pulling and pushing of AI Models. Options: oci, ollama, huggingface. -RAMALAMA_TRANSPORT environment variable overrides this field. \ No newline at end of file +RAMALAMA_TRANSPORT environment variable overrides this field. + +`[[ramalama.http_client]]` + +Http client configuration + +**max_retries**=5 + +The maximum number of times to retry a failed download + +**max_retry_delay**=30 + +The maximum delay between retry attempts in seconds \ No newline at end of file diff --git a/docsite/docusaurus.config.ts b/docsite/docusaurus.config.ts index fbfd09b4..30287954 100644 --- a/docsite/docusaurus.config.ts +++ b/docsite/docusaurus.config.ts @@ -17,8 +17,8 @@ const config: Config = { // Set the production url of your site here url: 'https://ramalama.ai', // Set the // pathname under which your site is served - // For GitHub pages deployment, it is often '//' - baseUrl: '/', + // The docs live at https://ramalama.ai/docs + baseUrl: '/docs/', // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. @@ -46,6 +46,7 @@ const config: Config = { 'classic', { docs: { + routeBasePath: '/', sidebarPath: './sidebars.ts', // Please change this to your repo. // Remove this to remove the "edit this page" links. diff --git a/docsite/package-lock.json b/docsite/package-lock.json index 090902b3..a791f869 100644 --- a/docsite/package-lock.json +++ b/docsite/package-lock.json @@ -233,6 +233,7 @@ "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.44.0.tgz", "integrity": "sha512-/FRKUM1G4xn3vV8+9xH1WJ9XknU8rkBGlefruq9jDhYUAvYozKimhrmC2pRqw/RyHhPivmgZCRuC8jHP8piz4Q==", "license": "MIT", + "peer": true, "dependencies": { "@algolia/client-common": "5.44.0", "@algolia/requester-browser-xhr": "5.44.0", @@ -358,6 +359,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -2147,6 +2149,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -2169,6 +2172,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" } @@ -2278,6 +2282,7 @@ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "license": "MIT", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -2699,6 +2704,7 @@ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "license": "MIT", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -3609,6 +3615,7 @@ "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.9.2.tgz", "integrity": "sha512-C5wZsGuKTY8jEYsqdxhhFOe1ZDjH0uIYJ9T/jebHwkyxqnr4wW0jTkB72OMqNjsoQRcb0JN3PcSeTwFlVgzCZg==", "license": "MIT", + "peer": true, "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/logger": "3.9.2", @@ -4312,6 +4319,7 @@ "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.1.tgz", "integrity": "sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw==", "license": "MIT", + "peer": true, "dependencies": { "@types/mdx": "^2.0.0" }, @@ -4630,6 +4638,7 @@ "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", "license": "MIT", + "peer": true, "dependencies": { "@babel/core": "^7.21.3", "@svgr/babel-preset": "8.1.0", @@ -5001,6 +5010,7 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.5.tgz", "integrity": "sha512-keKxkZMqnDicuvFoJbzrhbtdLSPhj/rZThDlKWCDbgXmUg0rEUFtRssDXKYmtXluZlIqiC5VqkCgRwzuyLHKHw==", "license": "MIT", + "peer": true, "dependencies": { "csstype": "^3.0.2" } @@ -5351,6 +5361,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -5436,6 +5447,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -5481,6 +5493,7 @@ "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.44.0.tgz", "integrity": "sha512-f8IpsbdQjzTjr/4mJ/jv5UplrtyMnnciGax6/B0OnLCs2/GJTK13O4Y7Ff1AvJVAaztanH+m5nzPoUq6EAy+aA==", "license": "MIT", + "peer": true, "dependencies": { "@algolia/abtesting": "1.10.0", "@algolia/client-abtesting": "5.44.0", @@ -5944,6 +5957,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.25", "caniuse-lite": "^1.0.30001754", @@ -6900,6 +6914,7 @@ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "license": "MIT", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -8273,6 +8288,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -12734,6 +12750,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -13249,6 +13266,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -14152,6 +14170,7 @@ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "license": "MIT", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -14946,6 +14965,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -14955,6 +14975,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", "integrity": "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==", "license": "MIT", + "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -15010,6 +15031,7 @@ "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-6.0.0.tgz", "integrity": "sha512-YMMxTUQV/QFSnbgrP3tjDzLHRg7vsbMn8e9HAa8o/1iXoiomo48b7sk/kkmWEuWNDPJVlKSJRB6Y2fHqdJk+SQ==", "license": "MIT", + "peer": true, "dependencies": { "@types/react": "*" }, @@ -15038,6 +15060,7 @@ "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz", "integrity": "sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.12.13", "history": "^4.9.0", @@ -16810,7 +16833,8 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" + "license": "0BSD", + "peer": true }, "node_modules/type-fest": { "version": "2.19.0", @@ -16873,6 +16897,7 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "devOptional": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -17214,6 +17239,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -17421,6 +17447,7 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.102.1.tgz", "integrity": "sha512-7h/weGm9d/ywQ6qzJ+Xy+r9n/3qgp/thalBbpOi5i223dPXKi04IBtqPN9nTd+jBc7QKfvDbaBnFipYp4sJAUQ==", "license": "MIT", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -18007,6 +18034,7 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" }